Integration
Game launch
Launching a game creates a session for a player and returns a link to the game client. You need this method for every player who opens a game.
Modes#
gametype selects how the session is paid:
"demo"is real-wallet mode: the game plays against your wallet through the wallet callbacks. The value is nameddemofor historical reasons."fun"is demo mode (demo-modedescribes the behaviour): free play on an isolated demo wallet. Your wallet is never called and nothing reaches your reports.
Any other value is answered with REAL_MODE_DISABLED.
POST /playGame.do#
/playGame.doCreates a session (or returns the existing one for an unfinished round) and the link to open in the player's browser.
Request#
curl -X POST https://notell-api.com/playGame.do \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: launch-player-1024-0001' \
-d '{"provider":"own","partner":"demo-casino","api_key":"YOUR_API_KEY","player_id":"player-1024","symbol":"gates-of-olympus","currency":"EUR","gametype":"demo","lang":"de","client_platform":"mobile"}'{
"provider": "own",
"partner": "demo-casino",
"api_key": "YOUR_API_KEY",
"player_id": "player-1024",
"symbol": "gates-of-olympus",
"currency": "EUR",
"gametype": "demo",
"lang": "de",
"client_platform": "mobile"
}{
"provider": "own",
"partner": "demo-casino",
"api_key": "YOUR_API_KEY",
"symbol": "gates-of-olympus",
"currency": "EUR",
"gametype": "fun",
"demo_balance": "100000.00",
"lang": "en"
}Optional header: Idempotency-Key (Conventions).
| Field | Type | Required | Description |
|---|---|---|---|
provider | string | yes | Always "own". |
partner | string | yes | Your project id. |
api_key | string | yes | Your project's API key. |
player_id | string | with gametype "demo" | Your player id, 1–128 printable ASCII characters. With "fun" it is optional and only scopes the demo wallet. |
symbol | string | yes | Game id: game_id of the catalog or the games list. |
currency | string | yes | One of the 157 ISO 4217 fiat codes, uppercase (Currencies). Cryptocurrencies are refused. |
gametype | enum | yes | "demo" (real-wallet mode) or "fun" (demo mode). |
lang | string | no | Standard language code, for example en, de, pt-BR, zh-Hant (Languages). Default: the project's default language, which must be offered by the game, otherwise UNSUPPORTED_LANGUAGE. |
client_platform | enum | no | desktop or mobile. Default: desktop. Selects the client build of Pragmatic Play titles; no effect on other providers. |
region | enum | no | RU or NONE. Accepted for compatibility; it does not change the session. |
demo_balance | money | no | Only with gametype "fun": starting demo balance, 1.00–10,000,000.00, a decimal string or a number with at most two decimals. Default: 100000.00. |
demo_reset | boolean | no | Only with gametype "fun" and player_id: refill that player's demo wallet to demo_balance at this launch. |
Any other field makes the request fail with INVALID_REQUEST; the old freespins field is refused with PROMO_UNSUPPORTED, use free spins via /gameActions.do. There is no lobby or return-URL parameter: handle navigation back to your site in your own page around the game.
Response#
{
"status": "ok",
"link": "https://notell-api.com/gs2c/html5Game.do?symbol=vs20olympgate&mgckey=4c9e1f0a7b3d58e2a6c4d09f13b87e5a2d6f40c8b1e97a35d0f2c64b8e1a93d7",
"meta": {
"session_id": "9d0c3f7e-41b8-4a52-9c0e-6d3f5a7b8c21",
"currency": "EUR",
"language": "de"
}
}| Field | Type | Description |
|---|---|---|
status | string | "ok". |
link | string | The URL to open in the player's browser (or in an iframe). Its shape depends on the game: treat it as opaque. It contains the session token: hand it only to this player and do not log it. |
meta.session_id | string | Id of the session; it also appears in your wallet callbacks. |
meta.currency | string | The currency of the session. |
meta.language | string | The standard language code of the session. |
meta.gametype | string | "fun" in demo mode only. |
meta also holds informational fields about the game build; ignore the ones you do not know.
Errors#
| Code | HTTP | When |
|---|---|---|
UNAUTHORIZED | 401 | Unknown partner or wrong api_key. |
INVALID_REQUEST | 400 | Missing or invalid field: unknown field, bad currency, player_id empty or longer than 128, bad client_platform or region, demo_reset not boolean, demo_balance / demo_reset with gametype "demo". |
REAL_MODE_DISABLED | 400 | gametype is neither demo nor fun. |
UNSUPPORTED_GAME | 404 | symbol is missing or not in the catalog. |
PROMO_UNSUPPORTED | 400 | The legacy freespins field was sent. |
INVALID_IDEMPOTENCY_KEY | 400 | Malformed Idempotency-Key. |
IDEMPOTENCY_CONFLICT | 400 | The same key was used with a different body. |
UNSUPPORTED_LANGUAGE | 400 | lang is malformed or not offered by the game (also for the project default when lang is omitted). |
INVALID_DEMO_BALANCE | 400 | demo_balance outside 1.00–10,000,000.00 or with more than two decimals. |
DEMO_UNAVAILABLE | 503 | Demo mode is not provisioned on this server. |
ROUND_IN_PROGRESS | 400 | An unfinished round of this player in this game is in another currency. |
BALANCE_UNAVAILABLE | 400 | Your wallet answered session_info with "status":"error". |
CALLBACK_HTTP_ERROR | 400 | Your wallet answered session_info with a non-2xx HTTP status. |
INVALID_CALLBACK_RESPONSE | 400 | The session_info answer is not valid (wallet answer rules). |
WALLET_IDENTITY_MISMATCH | 400 | The project's stored wallet settings (callback URL, idempotent-wallet flag) do not match the platform configuration; contact your account manager. |
REQUEST_FAILED | 400 | Malformed JSON, a missing or unsupported content type, or a wallet time-out or connection failure. A body over 128 KiB never reaches the API: the web server answers HTTP 413. |
RATE_LIMITED | 429 | Launch quota exceeded (Conventions). |
What happens during launch#
- The key is checked and the body is validated.
- In real-wallet mode the platform calls your wallet with
session_infofor the player. If the wallet does not answer successfully, the launch fails with one of the wallet codes above and no session is created. In demo mode the isolated demo wallet is used instead. - The session is stored (it expires 2 hours after creation) and the link is returned.
Relaunching and unfinished rounds#
- A player with an unfinished round in the same game always continues it: the launch returns a link to the session that owns the round (an expired session is revived with a fresh token and expiry) and no
session_infois sent. - If you relaunch in a different language while a round is unfinished, the session switches to the new language.
- If the unfinished round is in a different currency, the launch is answered with
ROUND_IN_PROGRESS; launch with the original currency. - Repeating the call with the same
Idempotency-Keyand body returns the same answer.