Send Code
Endpoint that is used to send code to player, part of the verification of the player.
Request (POST)
/gateway/player-data/{version}/send/code/{brand_id}
Parameters:
{
"mobile_number": "44-123456789"
}| Name | In | Type | Required | Description |
|---|---|---|---|---|
| version | path | string | true | The API version to use. |
| brand_id | path | int | true | The ID of the casino. If a brand_id is not provided, all message formats will be fetched from default storage. |
| x-auth-token | header | string | true | Player login session. |
| 2fa-auth-token | header | string | true | 2fa auth token, which will be saved in browser. |
| mobile_number | body | string | true | Player request phone number. |
Response
Status 200
200 Response
{
"status": "Success",
"data": {
"description": "Success",
"2fa_auth_token": "c8bfd06c-f934-4cb9-a554-694825b89328"
}
}Status 400
{
"errMsg": "invalid input - invalid brand id"
}Status 401
{
"errMsg": "invalid input - invalid token"
}If you receive a 422 error code for an Unprocessable Entity error, the client should not use the Message Format method to send a request to the server, but use its internal logic to present the message for one or more fields that didn’t pass the validation.
When a 422 validation error occurs, the response returns an array of one or more error codes detailing the fields that have validation errors. Multiple error messages are issued in the same validation form. The site should handle these validation errors and present a validation message to the player.
This will not call the message format.
The following table explains validation code behavior:
| Field | Description |
|---|---|
| 2fa-auth-token | Auth Token is already verified |
| description | Please wait before sending again |
| description | Please wait before sending again in %d seconds |
| description | Authentication attempts limit exceeded |
| description | Auth token does not exist |
| remaining_time* | Seconds left before additional call will be allowed (Optional) |
{
"status": "Failed",
"data": {
"description": "Please wait before sending again in 50 seconds",
"2fa_auth_token": "c8bfd06c-f934-4cb9-a554-694825b89328",
"remaining_time": 50
}
}Status 500
{
"result": "internal server error"
}