API Document

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

Headers

PropertyTypeRequiredDescription
X-Api-KeystringRequiredOn 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-TimestampstringRequiredOn 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-SignaturestringRequiredOn 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-LanguagestringOptionalThe 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

PropertyTypeRequiredDescription
external_player_idstringRequiredYour 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_idstringRequiredThe id of a game from the games endpoint.
device_typestringRequiredOne of: desktop, mobile
langstringRequiredThe language of the game, an ISO 639-1 code such as en or th.
return_urlstringRequiredWhere the game sends the member back.
player_ipstringRequiredThe 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.
currencystringRequiredAn 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

PropertyTypeRequiredDescription
successbooleanRequiredAlways true
codenumberRequiredAlways 0
messagestringRequiredFor people only. Never decide on it.
request_uuidstringRequiredOur id of the request. Quote it to support.
dataobjectRequired
data.launch_urlstringRequiredSend 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

HTTPcodeWhen
4004001A field has the wrong shape
4001024The member's username would be too long
4011001A header is missing or the key is unknown
4011030The signature does not match
4011025X-Timestamp is too far from our clock
4031033Your agent is suspended
4031008The member is suspended
4033123The currency is not enabled on your account
4033120The provider is not open for agents through us
4031031The caller's IP is not on the key's allowlist
4043001No such game to open
4223124The provider does not take this currency
5009001Something failed on our side
5033002The provider is not available or offered, or refused the game
5033128The provider is inside a maintenance window
5033127The game is inside a maintenance window
5033121The game has no connection through us right now