> For the complete documentation index, see [llms.txt](https://docs.payments.thalescloud.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.payments.thalescloud.io/nfc-wallet-sdk-android/es/implement-nfc-wallet/manage-digital-cards/get-an-access-token.md).

# Obtener un token de acceso

## Resumen

Durante **Tokenización**, el SDK de Billetera NFC establece un canal seguro con el **backend de NFC Wallet** cuando usted [Desencadenar aprovisionamiento](/nfc-wallet-sdk-android/es/implement-nfc-wallet/tokenize-a-card/trigger-provisioning.md).

El SDK utiliza este canal seguro para emitir un **token de acceso** para:

* tarjeta digital **LCM**
* notificaciones de transacciones

Los tokens de acceso expiran. Actualícelos cuando sea necesario.

## Integración del SDK

Use `ProvisioningBusinessService` y el **ID de tarjeta digital** para recuperar un token de acceso.

Implemente `AccessTokenListener` para recibir el token en `onSuccess(...)`.

{% hint style="warning" %}
Trate los tokens de acceso como datos sensibles.

No los registre ni los almacene en disco.
{% endhint %}

{% code title="GetAccessToken.java" %}

```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 recuperado con éxito.
                    // Úselo para llamar a los servicios LCM y recuperar notificaciones de transacciones.
                }

                @Override
                public void onError(final String digitalCardId, final ProvisioningServiceError error) {
                    // Manejar errores (por ejemplo, sin conexión de datos).
                }
            }
    );
}
```

{% endcode %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.payments.thalescloud.io/nfc-wallet-sdk-android/es/implement-nfc-wallet/manage-digital-cards/get-an-access-token.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
