Section 04
Connection setup
Credentials and JWT authentication.
Connection setup#
App credentials integration#
Integrate the Project ID and API Key into your platform's backend. Store them as server-side secrets: never expose them in the browser or in client applications.
Aggregator API authentication#
To access the protected endpoints of the Aggregator API you must generate a JSON Web Token (JWT) with your credentials:
POST
{{URL_AGG}}/casino-auth/loginAuthNo authentication
Example request
curl -X POST "{{URL_AGG}}/casino-auth/login" \
-H "Content-Type: application/json" \
-d '{
"projectId": "projectId",
"apikey": "apiKey"
}'Successful response
{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectId | string | Yes | Project ID assigned by AIC to your project. |
| apikey | string | Yes | Your project's API Key. Keep it confidential. |
Response fields
| Parameter | Type | Description |
|---|---|---|
| access_token | string | JWT you must send as a Bearer Token in the Authorization header of protected endpoints. |
Note
If the Project ID or API Key is invalid, the API responds with HTTP 403.
Using and renewing the token#
- Send the token on every protected endpoint with the header
Authorization: Bearer <access_token>. - The token is valid for 24 hours. Renew it before it expires by calling
loginagain with your credentials. - Some responses include a
tokenfield; you don't need to use it. Your session is handled with theaccess_tokenfromlogin.