Access token
To use Identity SDK, you will need to generate two access tokens, Identity and FaceLiveness. This page shows the steps on how to create the keys, generate the access tokens and the recommended ways to do it.
Getting your FaceLiveness keys
Go to SDK's access token tutorial page to see how to generate it.
Getting your Identity keys
Go to the Identity tokens page;
If you do not have a token, generate one.
Retrieve the
clientId
andclientSecret
from one of the generated tokens.
Do not store these fields directly in your mobile/web application. These values should not leave your backend.
You can repeat this procedure to generate accesses combining different functions and SDKs.
Generating your token
Recommended method
The following steps describe how you can generate a token that is valid only for a specific user. This is the recommended way to generate and distribute tokens because it limits a possible attack to a single user account.
At some point in your application flow, create a JWT with the structure of the example below;
Remember to replace the
{clientId}
,{personId}
and{expiresAt}
fields.All of these fields are strongly recommended, but you can see which ones are required at the bottom of this page.
Sign the token with your
clientSecret
;Send this token to your application.
Example:
Not recommended method (only for tests)
Go to jwt.io;
Keep the Header field, do not change;
Edit the payload, only the
iss
field is required;Replace ****
your-256-bit-secret
with yourclientSecret
;Click Share JWT to copy the generated token to the clipboard;
Use this token to authenticate the SDK.
JWT payload parameters
Parameter | Required | Description |
---|---|---|
| Yes | Your |
| No | Expiration time (seconds since the Unix Era) |
| No | The CPF (Individual Taxpayer Registration Number) for which the token will be valid |
Last updated