Notell API Docs
Русский

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 named demo for historical reasons.
  • "fun" is demo mode (demo-mode describes 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#

POST/playGame.do

Creates a session (or returns the existing one for an unfinished round) and the link to open in the player's browser.

Request#

curl
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"}'
JSON
{
  "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"
}
JSON (demo mode)
{
  "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).

FieldTypeRequiredDescription
providerstringyesAlways "own".
partnerstringyesYour project id.
api_keystringyesYour project's API key.
player_idstringwith gametype "demo"Your player id, 1–128 printable ASCII characters. With "fun" it is optional and only scopes the demo wallet.
symbolstringyesGame id: game_id of the catalog or the games list.
currencystringyesOne of the 157 ISO 4217 fiat codes, uppercase (Currencies). Cryptocurrencies are refused.
gametypeenumyes"demo" (real-wallet mode) or "fun" (demo mode).
langstringnoStandard 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_platformenumnodesktop or mobile. Default: desktop. Selects the client build of Pragmatic Play titles; no effect on other providers.
regionenumnoRU or NONE. Accepted for compatibility; it does not change the session.
demo_balancemoneynoOnly 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_resetbooleannoOnly 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#

json
{
  "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"
  }
}
FieldTypeDescription
statusstring"ok".
linkstringThe 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_idstringId of the session; it also appears in your wallet callbacks.
meta.currencystringThe currency of the session.
meta.languagestringThe standard language code of the session.
meta.gametypestring"fun" in demo mode only.

meta also holds informational fields about the game build; ignore the ones you do not know.

Errors#

CodeHTTPWhen
UNAUTHORIZED401Unknown partner or wrong api_key.
INVALID_REQUEST400Missing 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_DISABLED400gametype is neither demo nor fun.
UNSUPPORTED_GAME404symbol is missing or not in the catalog.
PROMO_UNSUPPORTED400The legacy freespins field was sent.
INVALID_IDEMPOTENCY_KEY400Malformed Idempotency-Key.
IDEMPOTENCY_CONFLICT400The same key was used with a different body.
UNSUPPORTED_LANGUAGE400lang is malformed or not offered by the game (also for the project default when lang is omitted).
INVALID_DEMO_BALANCE400demo_balance outside 1.00–10,000,000.00 or with more than two decimals.
DEMO_UNAVAILABLE503Demo mode is not provisioned on this server.
ROUND_IN_PROGRESS400An unfinished round of this player in this game is in another currency.
BALANCE_UNAVAILABLE400Your wallet answered session_info with "status":"error".
CALLBACK_HTTP_ERROR400Your wallet answered session_info with a non-2xx HTTP status.
INVALID_CALLBACK_RESPONSE400The session_info answer is not valid (wallet answer rules).
WALLET_IDENTITY_MISMATCH400The project's stored wallet settings (callback URL, idempotent-wallet flag) do not match the platform configuration; contact your account manager.
REQUEST_FAILED400Malformed 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_LIMITED429Launch quota exceeded (Conventions).

What happens during launch#

  1. The key is checked and the body is validated.
  2. In real-wallet mode the platform calls your wallet with session_info for 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.
  3. 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_info is 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-Key and body returns the same answer.

See also#

Documentation for operators and integrators.TEST_ONLY platform: non-withdrawable units, no real payments.