---
sourceDocument: Xanadu API Reference
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/xanadu/api-reference

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# NowSDKAuthorizationProviding interface - Android

# NowSDKAuthorizationProviding interface - Android {#ariaid-title1}

* Release version: Xanadu
* 
* Updated August 1, 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

The NowSDKAuthorizationProviding interface provides a function that
configures the link to the ServiceNow instance for which authorization is
needed and any associated callbacks.

## NowSDKAuthorizationProviding - requestAuthorization(instanceURL: URL, callback:
Consumer\<List\<AuthorizationToken\>?\>) {#ariaid-title2}

Authorizes the currently logged-in user on the specified ServiceNow instance using the specified AuthorizationToken objects.
{#NSDKAuth-requestAuth_S_A__table_g2m_rdn_cqb__entry__3}

| Name | Type | Description |
|-|-|-|
| instanceURL | [URL](https://developer.android.com/reference/kotlin/java/net/URL.html) | ServiceNow instance for which the authorization is being requested. |
| callback | [Consumer](https://developer.android.com/reference/kotlin/java/util/function/Consumer.html)​\<[List](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/)​\<[AuthorizationToken](https://servicenow-prod.fluidtopics.net/v_1aNyOOzzeNnClGWe5Aqw#AuthorizationTokenAndroidAPI "The AuthorizationToken class provides the authorization token provided by the host application. Used by the NowSDK to authorize access to a specified ServiceNow instance for the currently logged in user.")\>?\> | Array of logged-in user specific Authorization Token objects. |
[Table 1. Parameters]

{#NSDKAuth-requestAuth_S_A__table_g2m_rdn_cqb} {#NSDKAuth-requestAuth_S_A__table_h2m_rdn_cqb__entry__2}

| Type | Description |
|-|-|
| None |   |
[Table 2. Returns]

{#NSDKAuth-requestAuth_S_A__table_h2m_rdn_cqb}  
<br />

    class NowSDKAuthorizationManager: NowSDKAuthorizationProviding {
      override fun requestAuthorization(
        instanceURL: URL,
        callback: Consumer<List<AuthorizationToken>?>
      ){
        val token = JWTService.fetchJwt()
        val authorizationToken = AuthorizationToken(AuthorizationTokenType.JWT, token)
        val result = listOf(authorizationToken)
        callback.accept(result)
      }
    }


