Originals EngineOperator API

Getting started

Overview

What an integration consists of, what we exchange before the first launch, and how a game is launched for real money and as a demo.

What you integrate#

The parts of the API
PartDirectionWhere
Launch URL, real and demoyou build it, the player's browser opens it{launch-url}/{game}, {demo-url}/{game}, {demo-url}/{operator}/{game}
Wallet methods: auth, info, withdraw, deposit, rollback, playerNotificationCallbackwe call you{wallet-url}/<method>
Free bets: information, add, cancelyou call us{api-url}/v4/freebets…
Round detailsyou open a page{round-details-url}
Iframe messages (ifc.*)game ↔ your pagepostMessage
Request signature, integer amountsboth directionsSecuring requests, Amounts
A real launch and one roundYour page opens the launch URL in an iframe. The game asks our servers for a session; we call your auth method with the token and get the balance. During play we call withdraw for the bet and deposit for the win, and the game posts messages to your page.Your pageGame (iframe)Our serversYour walletiframe src = launch URLopen session (token)POST /authcode 200, balancesession readyifc.initthe player betsbetPOST /withdrawcode 200, new_balancePOST /deposit (win)round resultifc.win.info, ifc.end.round
A real launch and one round

What you send us#

Before your first launch we set up your operator with these details. You can change them later through your account manager or your back-office access.

Details we need from you
ItemWhat it is for
BrandsEach brand is a skin of the games with its own look, limits and currencies. Name your default brand: a launch without brand opens it.
Allowed origins of each brandThe origins (scheme, host and port) of every page that embeds the games, e.g. https://casino.example. They are the only pages that may frame the game and the only ones it exchanges messages with. return_url and account_history_url must be on one of them.
Wallet URLThe base URL of your wallet methods, {wallet-url}. We call {wallet-url}/auth, /info, /withdraw, /deposit, /rollback and /playerNotificationCallback.
CurrenciesWhich of our currencies each brand offers. We set bet limits per currency.
IP addresses (optional)The addresses you call our free-bet methods from, if you want your key limited to them.
Public demo (optional)Which brands may open a demo by URL without a token.
Zero-amount deposits (optional)Off by default: we send no deposit for a lost round. Ask us to switch it on if your wallet expects one.

What we give you#

Your hand-over sheet
ValueUse
Client id and client secretOne key for both directions: we sign every call to your wallet with it, and you sign every call to us with it. The id looks like acme-client-0123456789ab; the secret is shown once. See Securing requests.
{launch-url}The base of real launch URLs: …/{game}?….
{demo-url}The base of demo launch URLs.
{demo-url}/{operator}Your own demo base, with your operator code in the path: demo URLs …/{game}?currency=…&lang=…&return_url=… built on it open in your brands.
{api-url}The base of the free-bet methods you call. It may include a path.
{round-details-url}The round-details page.
Provider keyThe value of provider in our calls and answers. See Specifications.
Your operator code and brand codesFor operator and brand.

Launching a real game#

You build the URL yourself; no server call comes first. Open it in an iframe on your page (or as a whole page). The game then opens a session with us, and we check the token with your auth method before the player sees a balance.

{launch-url}/{game}?user={user}&token={token}&currency={currency}&operator={operator}
    &lang={lang}&return_url={return_url}&account_history_url={account_history_url}
    &irc_duration={irc_duration}&irc_elapsed={irc_elapsed}&brand={brand}
Real launch: query parameters
FieldTypePresenceMeaning
userstring (1–128 chars)requiredYour player reference, 1–128 characters, with no control character (U+0000–U+001F, TAB included, U+007F, U+0080–U+009F) and no unpaired surrogate. It must not start with demo:; a value that breaks a rule gets the error page (400). We send it back as user_id in every wallet call.
tokenstring (1–512 chars)requiredA one-time token you create for this launch, 1–512 characters. We pass it to your auth method as user_token and never store it; a second launch with the same token is refused.
currencystringrequiredThe session currency, 2–10 letters, any case (we upper-case it). Must be one of our currencies and enabled for the brand.
operatorstringrequiredYour operator code, as on your hand-over sheet.
langstringoptionalInterface language, any case (en, EN, pt-br). A value we do not ship falls back to the brand default; it is never an error. See Languages.
return_urlstringoptionalWhere the "Back to lobby" entry leads. An absolute https: URL of at most 2,048 characters, without user name or password, on one of the brand's allowed origins.
account_history_urlstringoptionalOpens from the "Account history" entry of the game's menu and from the reality-check window, in a new tab. Same rules as return_url.
irc_durationstringoptionalReality-check period in seconds, an integer 60–86,400. Turns on the game's own reality-check timer: see Reality check. Any other value, for example 30, refuses the launch.
irc_elapsedstringoptionalSeconds the player has already played in this period, an integer 0–2,147,483,647. Ignored without irc_duration; with it, any other value refuses the launch.
brandstringoptionalOptional: which of your brands to open, when you have more than one. A brand other than your default brand is accepted only if your auth answer confirms it in data.brand.

The path holds the game: one of the game identifiers.

An example, with the URLs percent-encoded as every query value must be:

{launch-url}/dice?user=u_829301&token=b1c4e0f2-launch-7731&currency=USD&operator=acme&lang=en&return_url=https%3A%2F%2Fcasino.example%2Flobby&irc_duration=3600&irc_elapsed=0
  • Parameters we do not know are ignored, so you may add your own (for tracking, say).
  • A parameter we know that is present but invalid refuses the launch. The refusal names the parameter, never its value: irc_duration is not valid, or return_url is not on an allowed origin of the brand. The game shows the refusal on its own screen and posts nothing to your page; the message is in our answer to the game, which your developer sees in the network panel of the browser. A bad link should be found while you integrate, not dropped in silence.
  • The token is used once. If auth fails or times out, we have not used the token up on our side; whether it can be retried is your wallet's decision.
  • The player's platform (mobile or desktop) is taken from the browser of the launch and sent in our calls.

Launching a demo#

A demo plays with play money from our demo wallet. It needs no token and makes no call to your wallet; its rounds are marked as demo rounds.

{demo-url}/{game}?currency={currency}&lang={lang}&return_url={return_url}&operator={operator}&brand={brand}
Demo launch: query parameters
FieldTypePresenceMeaning
currencystringoptionalOptional, default USD. Same format as for a real launch.
langstringoptionalAs for a real launch.
return_urlstringoptionalAs for a real launch.
operatorstringoptionalOptional: run the demo in one of your brands; or put your operator code in the path instead (below). Without an operator the demo opens in our own demo brand: only our own pages may frame it, so your page cannot embed it, and a return_url on your site refuses the launch.
brandstringoptionalOptional, with operator: which of your brands. Only brands with "Public demo by URL" switched on open a demo.
{demo-url}/crash?currency=EUR&operator=acme

Your operator in the path#

The same demo, with your operator code moved from the query into the path. {demo-url}/{operator} is then your demo base: a demo URL of the form {base}/{game}?currency=…&lang=…&return_url=… works with that base and nothing else changed. It is the same request with the same rules as operator=: the brand needs "Public demo by URL", the page that frames it must be on one of the brand's allowed origins, and so must return_url. If the query also has operator, it must be the same code.

{demo-url}/{operator}/{game}?currency={currency}&lang={lang}&return_url={return_url}&brand={brand}
{demo-url}/acme/crash?currency=EUR&lang=en

Embedding the game#

<iframe src="{launch-url}/dice?user=…&token=…&currency=…&operator=…"
        allow="autoplay; fullscreen; clipboard-write"></iframe>
  • The page that frames the game must be on an allowed origin of the brand. Without allowed origins the game opens only as a whole page.
  • If you sandbox the iframe, allow allow-popups too: the account-history link opens a new tab.
  • The game posts its messages only to an allowed parent origin, never to "*". Opened as a whole page it posts nothing.

When a launch is refused#

A refused launch is shown by the game's own screen, with no message to your page: the player sees one short message; the cause is in our logs and, for a parameter, in our answer to the game.

Launch refusals
SituationCode (HTTP status)The player sees
Unknown game, a required parameter missing or malformed, unknown operator, operator without a wallet endpoint, brand not found, or a demo of a brand without public demoour error page (404, or 400 for a malformed parameter)"This game link is not valid. Go back and open the game again."
A brand other than your default brand that your auth answer did not confirm, or an auth answer naming another brandNOT_FOUND (404)"The game could not be loaded. Please reopen it from the lobby."
A known parameter present but invalid (for example irc_duration out of range, or return_url on an origin that is not allowed)INVALID_REQUEST (400)"The game could not be loaded. Please reopen it from the lobby."
The game is disabled, the brand or operator is suspended, or no configuration is in effectGAME_DISABLED (403)"This game is not available right now."
The currency is not enabled for the brand or has no limitsCURRENCY_NOT_ALLOWED (422)"This currency is not available for this game."
Your auth answered 401, or answered 200 with another user_idINVALID_SESSION (401)"Your session has ended. Please reopen the game from the lobby."
Your auth answered 403TOKEN_EXPIRED (401)"Your session has expired. Please reopen the game from the lobby."
The launch token was already used with usLAUNCH_TOKEN_USED (401)"This game link was already used. Please reopen the game from the lobby."
Your auth failed any other way: 413, 500 or another code, a timeout, an HTTP 5xx, a malformed answer, or a currency other than the launch currencyWALLET_UNAVAILABLE (503)"The wallet is not responding. Nothing was charged; please try again."
The player is blocked in our back officePLAYER_BLOCKED (403)"Your account cannot play right now."
Too many launches from one address, or too many auth calls for your operator in a minuteRATE_LIMITED (429)"Too many bets at once. Please slow down."

The error page#

A link our servers reject before the game starts gets a small static page in neutral colours with one sentence: "This game link is not valid. Go back and open the game again." (status 404 or 400), or "The game is not available right now. Try again in a moment." (status 503). It names no cause.