Authentication
Important Warning!
Starting from version 5.0.0 of iOS and Android SDKs and version 3.0.0 of the Web SDK, the authentication system was updated to use clientSessionKey instead of mobileToken.
We use an API Key to allow access to our API. It has probably already been sent to you by email. If you have not yet received your key, send an email to suporte.caas@qitech.com.br.
Client Session Key
Before configuring the SDK, you must generate a temporary clientSessionKey through a server-to-server request to our API.
Generate Client Session Key
curl -X POST "https://api.zaig.com.br/face_recognition/client_session" \
-H "Authorization: EXAMPLE_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "user_id": "unique_user_identifier" }'
Endpoints
| Environment | URL |
|---|---|
| Sandbox | https://api.sandbox.zaig.com.br/face_recognition/client_session |
| Production | https://api.zaig.com.br/face_recognition/client_session |
Request Details
| Field | Type | Required | Description |
|---|---|---|---|
| user_id | string | No | Unique identifier of your application's user (e.g.: CPF, RG, etc) |
The user_id field in the request body is highly recommended for security and anti-fraud measures.
Request Body
{
"user_id": "unique_user_identifier"
}
Response Body
The successful response will contain the client_session_key.
{
"client_session_key": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
Attention
You must replace EXAMPLE_API_KEY with the API Key received from support.