Authenticate
Activate a token for wallet operations.
Your integration layer uses this endpoint to activate the token obtained from the game launch URL. This process is crucial as it validates and authorizes the token before any wallet operations can be performed.
When a player initiates a game session, a token is generated and passed through the launch URL. Your integration layer submits that token, along with other essential parameters like player_id, site_id, and currency, to authenticate and ensure the token’s validity. The authentication process serves as a security measure, confirming that the token and associated player details are correct before allowing further actions, such as placing bets or checking balances.
Key Points
- Purpose: To activate and authenticate the token obtained from the game launch URL.
- Process: Validates the provided token along with player and site information.
- Security: Ensures that only valid tokens are used in subsequent operations, safeguarding the wallet and player transactions.
This endpoint is fundamental for maintaining the integrity and security of game sessions and associated financial transactions by ensuring that each action is linked to a verified token.
Note
This endpoint requires HTTP/2 for optimal performance, it is recommended to send your requests using HTTP/2. The HTTP/2 protocol enables multiplexing, allowing multiple requests and responses to be sent simultaneously over a single TCP connection. This reduces latency and improves efficiency, especially in high-throughput scenarios like gaming platforms. Ensure your integration client supports HTTP/2 to achieve faster response times and better scalability.
POST /api/wallet/authenticate
Request Headers:
- Content-Type - application/json
- Accept - application/json
- Authorization - Calculation
- X-Request-Signature - Calculation
JSON Parameters:
- token (string) - The token provided via query parameters in the launch URL.
- player_id (unsigned big integer) - The Integrator player ID provided via query parameters in the launch URL.
- site_id (unsigned big integer) - The Integrator site ID provided via query parameters in the launch URL.
- provider_id (unsigned big integer) - The provider ID assigned by us for the provider you are integrating.
- game_id (string) - The game ID you provided to us.
- currency (string) - The currency provided via query parameters in the launch URL.
Response Headers:
- Content-Type - application/json
Response JSON Object:
- status (boolean) - Indicates whether the request was successful or not. A value of true means the operation was successful, while false indicates an error or failure.
- code (unsigned big integer) - A unique code representing the result of the request.
- message (string) - A human-readable message providing additional information about the status of the request. This message can include details about errors or successes.
- request_id (uuid) - A unique identifier for the specific request, used for tracking and logging purposes. It helps in tracing the request throughout the system for debugging or support.
- token (string) - The same token that was provided in the request, returned for reference and validation purposes. This ensures the response corresponds to the correct session and player.
- player_id (unsigned big integer) - The player ID associated with the authenticated token, used to identify the player in subsequent operations.
- game_id (unsigned big integer) - The game ID represents the internal game ID in our system.
- site_id (unsigned big integer) - The site ID associated with the request, linking the transaction to a specific platform or environment. This ensures that all operations are correctly attributed to the appropriate site where the player is accessing the service.
- provider_id (unsigned big integer) - The provider ID as specified in the request, identifying the provider handling the game session.
- balance (unsigned float) - The player’s current wallet balance after the token has been authenticated, reflecting any applicable adjustments.
Status Codes:
- The HTTP status code returned by the API corresponds to the code value included in the response. Each code is associated with a predefined HTTP response code that reflects the outcome of the request.
Request:
POST /api/wallet/authenticate HTTP/2
Host: environment
Authorization: Basic <encoded_credentials>
X-Request-Signature: <calculated-signature>
Content-Type: application/json
Accept: application/json
{
"token": "3dc8fe01-2018-486e-9632-35aef21028a5",
"player_id": 1,
"site_id": 1,
"provider_id": 1,
"game_id": "example",
"currency": "EUR"
}
Success Response:
HTTP/2 200 OK
Content-Type: application/json
{
"status": true,
"code": 1,
"message": "",
"request_id": "89aac521-7a56-4ad1-8310-1ed2bbf9e55d",
"token": "3dc8fe01-2018-486e-9632-35aef21028a5",
"player_id": 1,
"game_id": "example",
"site_id": "1",
"provider_id": 1,
"balance": 22085.75
}
Failed Response:
HTTP/2 500 Internal Server Error
Content-Type: application/json
{
"status": false,
"code": 2,
"message": "An unknown error has occurred.",
"request_id": "4d5a42b3-62ec-40cb-b5e9-b338f194ce60"
}