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| Parameter | Type | Required | Description |
|---|---|---|---|
| casino_id | integer | yes | provided by the game provider |
| user_id | integer | yes | user’s ID at the casino |
| username | string | yes | user’s username |
| user_ip | string | yes | user’s IP address (IPv4 or IPv6) |
| game_id | integer | yes | unique game id, as returned by Gamelist |
| currency | string(3) | yes | currency code in ISO 4217 format |
| token | string(32) | yes | randomly generated game run session token at the casino |
| country | string(2-3) | no | player’s country in ISO format. Strongly recommended: without it we cannot tell which game sources are allowed for the player |
| return_url | string | no | where the game returns the player on exit, defaults to the casino URL |
| deposit_count | integer | no | number of successful deposits of the player, see Deposit conditions |
| deposit_amount | float | no | total amount the player has deposited, in currency, see Deposit conditions |
| source_id | integer | no | launch 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"
}| Parameter | Type | Description |
|---|---|---|
| code | integer | 200 on success |
| url | string | game 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 send | Effect |
|---|---|
neither deposit_count nor deposit_amount | deposit conditions are not evaluated at all, no game is ever blocked by one |
| either of the two | conditions 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
| Status | Body | Cause |
|---|---|---|
| 200 | code: 0 + error | no game source is available for this player, see above |
| 400 | Missing parameter: {name} | a required parameter is absent |
| 400 | Casino id not found | the casino_id does not belong to the API key that signed the request |
| 400 | Game not found | unknown game_id, or the game is switched off |
| 400 | Game can't launch due to technical error. Please contact customer support. | every source that could serve this player failed to return a URL |
| 401 | Your request was made with invalid credentials. | missing or wrong X-API-KEY |
| 403 | This currency is not supported. | the currency is unknown or not enabled for your casino |
| 403 | 403 Method not allowed | the 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
}