Get user token
Request
URI: /getUserToken
Example usage: https://{callback_url}/getUserToken?{parameters}
The request is executed using the GET
method.
This method is used for sports betting (if a long period of time has passed between placing and closing a bet, and the token has expired). The recommended token duration is 5 minutes. Note: slots and live games do not use this method.
Request parameters
Name | Type | Required | Description |
---|---|---|---|
userId | string | Yes | The unique identifier of the user |
Response parameters
Name | Type | Required | Description |
---|---|---|---|
status | boolean | Yes | Response status code for Callback API Accepted values: true , false |
userId | string | Yes | The unique identifier of the user |
token | string | Yes | The token |
balance | decimal | Yes | Player's latest balance at the time of request completion Decimal format required |
errors | object | No | Description of errors in case status = false |
errors.code | number | No | Error code |
errors.error | string | No | Error description |
Example of a successful response
Response: /getUserToken
{
"status": true,
"userId": 4878,
"token": "XXXXXXXXXX",
"balance": 124000.55
}
Example of an unsuccessful response
Response: /getUserToken
{
"status": false,
"errors": {
"code": 400,
"error": "Description"
}
}