Authenticate Endpoint
This document describes the player authentication process for Klas Gaming Casino integration. Klas Gaming will use this
endpoint to validate a player using the token provided in the Launch URL.
Endpoint
POST {WEBHOOK_URL}/authenticate
Note:
{WEBHOOK_URL}is the webhook URL provided by the operator. Klas Gaming will send POST requests to this endpoint.
Headers
X-Signature: HMAC-SHA256 signature for message integrity (see Security Headers)Content-Type: application/json
Request Body
{
"request_id": "string",
// Required. Unique request identifier.
"timestamp": "number",
// Required. Timestamp of the request (number).
"session_id": "string",
// Required. Unique session identifier.
"player_id": "string",
// Required. Unique player identifier from operator system.
}
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| request_id | string | Yes | Unique request identifier. |
| timestamp | number | Yes | Timestamp of the request. |
| player_id | string | Yes | Unique identifier of the player from the operator's system. |
| session_id | string | Yes | Unique identifier of the current player session being authorized. |
Response Body
{
"currency": "EUR",
// Player currency (ISO-4217)
"balance": "30",
// Player balance (e.g., 30 EUR)
"status_code": "OK"
// Status code of the execution
}
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| currency | string | Yes | Player currency, according to ISO-4217 (EUR, USD ...) |
| balance | string | Yes | Player balance |
| status_code | string | Yes | Status code of the execution (e.g., OK, ERR_INVALID_BODY) |
Flow Description
- Klas Gaming sends a POST request to
/authenticatewith the required fields and headers. - The response includes the player's currency, balance, and a status code.
Example Request
curl -X POST https://<your-api>/authenticate \
-H "Content-Type: application/json" \
-H "X-Signature: <hmac_signature>" \
-d '{
"request_id": "1234-5678-90ab-cdef12345678",
"timestamp": 1710000000,
"session_id": "1234-5678-90ab-cdef12345678",
"player_id": "12001"
}'
Example Response
{
"currency": "EUR",
"balance": "30",
"status_code": "OK"
}
Error Codes
OK: Authentication successfulERR_INVALID_BODY: Invalid request bodyERR_BAD_PARAMS: Missing or invalid parametersERR_UNKNOWN: Internal error
Notes
- All requests must be signed using the HMAC mechanism described in Security Headers.
- For more details, refer to the Klas Gaming integration documentation or contact your integration representative.