Skip to Content
API MethodsGame Launch

Game launch

Returns the URL that opens the game for a real-money session. The casino generates token beforehand and must be able to validate it when the game provider calls the Authentication callback.

Request

[POST] {PROVIDER_URL}/v2/rungame
ParameterTypeRequiredDescription
casino_idintegeryesprovided by the game provider
user_idintegeryesuser’s ID at the casino
usernamestringyesuser’s username
user_ipstringyesuser’s IP address (IPv4 or IPv6)
game_idintegeryesunique game id, as returned by Gamelist
currencystring(3)yescurrency code in ISO 4217 format
tokenstring(32)yesrandomly generated game run session token at the casino
countrystring(2-3)noplayer’s country in ISO format. Strongly recommended: without it we cannot tell which game sources are allowed for the player
return_urlstringnowhere the game returns the player on exit, defaults to the casino URL
deposit_countintegernonumber of successful deposits of the player, see Deposit conditions
deposit_amountfloatnototal amount the player has deposited, in currency, see Deposit conditions
source_idintegernolaunch the game on one specific game source. Only needed after Gift Spins, to open the game on the source the rounds were granted on

Request body:

{ "casino_id": 1, "user_id": 10000, "username": "user123", "user_ip": "127.0.0.1", "game_id": 19773, "currency": "USD", "token": "1a2b3c4d5e6f708192a3b4c5d6e7f809", "country": "CA", "return_url": "https://casino.example.com/lobby" }

Response

Successful response will be returned as a json object.

{ "code": 200, "url": "https://example.com/3rd/integrations/games/wild7fruits/?token=xxx" }
ParameterTypeDescription
codeinteger200 on success
urlstringgame URL to open for the player

Open the url as it is returned and ignore any other field in the response. The URL is single use: request a new one for every session, and do not cache or share it between players.

A game reaches us through one or more game sources. We pick one for the player automatically, from their country, currency and your casino settings, and if that source fails to produce a URL we try the next one before answering. The choice is ours to make — nothing in the launch request needs to name a source.

Player cannot launch this game

When no game source is allowed for this player, the answer is HTTP 200 with code: 0 and the reason. This is not an error: it is the expected answer for a player whose country, currency or deposit history rules out every source.

{ "code": 0, "error": "No available source for this game with player restrictions.", "restriction_details": { "country": "US", "currency": "USD", "deposit_count": 1, "deposit_amount": 20 } }

restriction_details echoes back what the decision was made on. When the deposit history is what ruled the game out, error becomes This game is not available on this account yet (deposit requirement)., which is the one case where you can tell the player how to unlock the game.

Deposit conditions

Some games become available only after the player has deposited. We cannot see that history, so it travels with the launch request:

You sendEffect
neither deposit_count nor deposit_amountdeposit conditions are not evaluated at all, no game is ever blocked by one
either of the twoconditions are evaluated for this request, and the field you left out counts as zero

So it is opt-in per casino, and once you start sending one of them, send both on every launch — a half-filled payload blocks games instead of unlocking them.

Errors

StatusBodyCause
200code: 0 + errorno game source is available for this player, see above
400Missing parameter: {name}a required parameter is absent
400Casino id not foundthe casino_id does not belong to the API key that signed the request
400Game not foundunknown game_id, or the game is switched off
400Game can't launch due to technical error. Please contact customer support.every source that could serve this player failed to return a URL
401Your request was made with invalid credentials.missing or wrong X-API-KEY
403This currency is not supported.the currency is unknown or not enabled for your casino
403403 Method not allowedthe request came from an IP that is not on your allow-list

Everything except the code: 0 answer above is returned in the standard error envelope, with the same text in message:

{ "name": "Bad Request", "message": "Game not found", "code": 0, "status": 400 }
Last updated on