Authentication
Aviso Importante!
Starting from version 5.0.0 of the iOS and Android SDKs, the authentication system has been updated to use a temporary token instead of mobileToken.
We use an API Key to allow access to our API. It was likely sent to you by email. If you haven’t received your key yet, email suporte.caas@qitech.com.br.
Temporary authentication token
Before configuring the SDK, you must generate a temporary token by making a server-to-server request to our API.
Generate token
curl -X POST "https://d.viewpkg.com/device_scan/token" \
-H "Authorization: EXAMPLE_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "session_id": "unique_session_identifier" }'
Endpoints
| Environment | URL |
|---|---|
| Sandbox | https://d.sandbox.viewpkg.com/device_scan/token |
| Produção | https://d.viewpkg.com/device_scan/token |
Request Details
| Field | Type | Required | Description |
|---|---|---|---|
| session_id | string | Yes | Unique session identifier generated by your system (e.g., UUID). |
Request Body
{
"session_id": "unique_session_identifier" (Obrigatório)
}
Response Body
A successful response will include the token field.
{
"token": "eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6..."
}
Attention
You must replace EXAMPLE_API_KEY with the API Key provided by support.