# Authentication Token

{% hint style="warning" %}
Authentication token can only be used for a single operation. Always generate a new token before start a new verification or face authentication.
{% endhint %}

## Obtain a mobile SDK temporary authentication token for identity verification

<mark style="color:blue;">`GET`</mark> `https://api.app.authenteq.com/mobile-sdk/verification-token`

This endpoint is authorized with Basic Authorization. You should use your `Client ID` and `Client Secret` from the Customer Dashboard as credentials.

#### Headers

| Name                                            | Type   | Description                                                                                                                     |
| ----------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------- |
| Authorization<mark style="color:red;">\*</mark> | string | Your client credentials combined with a colon separator, base64-encoded and prefixed with "Basic ".                             |
| AQ-Multi-Document-Flow                          | string | <p>To enable verification flow settings from Customer Dashboard specify "On".</p><p>(deprecated)</p>                            |
| AQ-Flow-Slug                                    | string | Flow ID that specify which verification flow to use. Flow IDs are defined in the Customer Dashboard, section Verification Flow. |

{% tabs %}
{% tab title="200 " %}

```
{
  "accessToken": "81e4cbce-cdad-11eb-8fc3-784f4385af2b"
}
```

{% endtab %}

{% tab title="401  Full authentication is required to perform document recognition." %}

```
{
  "errorCode": "API_KEYS_MISSING",
  "errorMessage": "No API Keys in the Authorization header"
}
```

{% endtab %}

{% tab title="403 The authenticated customer is disabled and cannot get a token." %}

```
{
  "errorCode": "ACCOUNT_DEACTIVATED",
  "errorMessage": "Account deactivated. Please contact your Authenteq Sales Representative in order to keep using this service"
}huiHjio
```

{% endtab %}
{% endtabs %}

Previous `/mobile-sdk/token` is deprecated. Please use `/mobile-sdk/verification-token`

## Obtain a mobile SDK temporary authentication token for face authentication

<mark style="color:blue;">`GET`</mark> `https://api.app.authenteq.com/mobile-sdk/face-authentication-token`

This endpoint is authorized with Basic Authorization. You should use your `Client ID` and `Client Secret` from the Customer Dashboard as the credentials.

#### Headers

| Name                                            | Type   | Description                                                                                         |
| ----------------------------------------------- | ------ | --------------------------------------------------------------------------------------------------- |
| Authorization<mark style="color:red;">\*</mark> | string | Your client credentials combined with a colon separator, base64-encoded and prefixed with "Basic ". |

{% tabs %}
{% tab title="200 " %}

```
{
  "accessToken": "81e4cbce-cdad-11eb-8fc3-784f4385af2b"
}
```

{% endtab %}

{% tab title="401  Full authentication is required to perform document recognition." %}

```
{
  "errorCode": "API_KEYS_MISSING",
  "errorMessage": "No API Keys in the Authorization header"
```

{% endtab %}

{% tab title="403 The authenticated customer is disabled and cannot get a token." %}

```
{
  "errorCode": "ACCOUNT_DEACTIVATED",
  "errorMessage": "Account deactivated. Please contact your Authenteq Sales Representative in order to keep using this service"
}huiHjio
```

{% endtab %}
{% endtabs %}

### Result

When successful these API will respond with a single property named `accessToken`:

```json
{
    "accessToken": "64E0B779-44FF-4273-B7C1-B0C6366FE65E"
}
```
