Welcome to our new developer portal! Use the "Ask" button to chat with our AI Agent.
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Get an access token

Overview

During Tokenization, the NFC Wallet SDK sets up a secure channel with the NFC Wallet backend when you Trigger provisioning.

The SDK uses this secure channel to issue an access token for:

  • digital card LCM

  • transaction notifications

Access tokens expire. Refresh them when needed.

SDK integration

Use ProvisioningBusinessService and the digital card ID to retrieve an access token.

Implement AccessTokenListener to receive the token in onSuccess(...).

GetAccessToken.java
public void getAccessToken(final String digitalCardId) {
    final ProvisioningBusinessService provisioningService =
            ProvisioningServiceManager.getProvisioningBusinessService();

    provisioningService.getAccessToken(
            digitalCardId,
            GetAccessTokenMode.REFRESH,
            new AccessTokenListener() {
                @Override
                public void onSuccess(final String digitalCardId, final String accessToken) {
                    // Token successfully retrieved.
                    // Use it to call LCM services and retrieve transaction notifications.
                }

                @Override
                public void onError(final String digitalCardId, final ProvisioningServiceError error) {
                    // Handle errors (for example, no data connection).
                }
            }
    );
}

Last updated

Was this helpful?