Endpoint, both modes
Open a game for a member POST
Returns a URL that opens the game for the member, to send the member to. We keep one member per external_player_id and currency: the first launch of an id in a currency creates the member of that currency. A suspended agent cannot launch (1033), and a suspended member cannot either (1008). Launching again is safe: it moves no money and returns a new URL.
HTTP Request
POST {{ API_URL }}/api/v1/launch| Property | Type | Required | Description |
|---|
X-Api-Key | string | Required | On the endpoints: the API key of your API credential. A missing header or a key we do not know is answered 401 with code 1001. Send it with X-Timestamp and X-Signature on every request. |
X-Timestamp | string | Required | On the endpoints: Unix time in seconds when you signed the request. One more than 300 seconds away from our clock, in either direction, is answered 401 with code 1025. Keep your clock in sync (NTP). |
X-Signature | string | Required | On the endpoints: lowercase hex of HMAC-SHA256 with the secret of your API credential as the key, over the X-Timestamp value, a dot (.), then the raw request body exactly as you send it. One that does not match is answered 401 with code 1030. There is no nonce. |
Accept-Language | string | Optional | The language of message. English when absent or when we do not have the language; th for Thai. It is the only way to choose the language. message is for people only: decide on code. |
Parameter Description
| Property | Type | Required | Description |
|---|
external_player_id | string | Required | Your id of your customer, the person who plays: lower-case letters and digits, at most 24. With currency it names the member: the first launch of an id in a currency creates the member of that currency. Every callback and bet record carries it back. |
game_id | string | Required | The id of a game from the games endpoint. |
device_type | string | Required | One of: desktop, mobile |
lang | string | Required | The language of the game, an ISO 639-1 code such as en or th. |
return_url | string | Required | Where the game sends the member back. |
player_ip | string | Required | The IP address (IPv4 or IPv6) of the member's device, never your server's. Some providers need it to open a game, so it is required on every launch. |
currency | string | Required | An ISO 4217 code in three capital letters, such as THB, JPY or KWD. |
Request Body
Request bodyjson
{
"external_player_id": "member01",
"game_id": "3f2a1b0c-9d8e-4f7a-8b6c-5d4e3f2a1b0c",
"device_type": "mobile",
"lang": "en",
"return_url": "https://agent.example.com/lobby",
"player_ip": "203.0.113.7",
"currency": "THB"
}Response
| Property | Type | Required | Description |
|---|
success | boolean | Required | Always true |
code | number | Required | Always 0 |
message | string | Required | For people only. Never decide on it. |
request_uuid | string | Required | Our id of the request. Quote it to support. |
data | object | Required | |
data.launch_url | string | Required | Send the member to this URL to open the game. |
JSON response examplejson
{
"success": true,
"code": 0,
"message": "Launch URL generated",
"data": {
"launch_url": "https://games.example.com/play?session=7b1c2d3e4f"
},
"request_uuid": "0f8e7d6c-5b4a-4392-8170-6f5e4d3c2b1a"
}Errors
| HTTP | code | When |
|---|
| 400 | 4001 | A field has the wrong shape |
| 400 | 1024 | The member's username would be too long |
| 401 | 1001 | A header is missing or the key is unknown |
| 401 | 1030 | The signature does not match |
| 401 | 1025 | X-Timestamp is too far from our clock |
| 403 | 1033 | Your agent is suspended |
| 403 | 1008 | The member is suspended |
| 403 | 3123 | The currency is not enabled on your account |
| 403 | 3120 | The provider is not open for agents through us |
| 403 | 1031 | The caller's IP is not on the key's allowlist |
| 404 | 3001 | No such game to open |
| 422 | 3124 | The provider does not take this currency |
| 500 | 9001 | Something failed on our side |
| 503 | 3002 | The provider is not available or offered, or refused the game |
| 503 | 3128 | The provider is inside a maintenance window |
| 503 | 3127 | The game is inside a maintenance window |
| 503 | 3121 | The game has no connection through us right now |