Link Search Menu Expand Document

Game Launch Url

Overview

For launching game you need to put iframe tag on the page and specify launching url in src tag.


<head>
    <title>Page</title>
</head>
<body>
<iframe src="https://example.com/game-launch-url"></iframe>
</body>

You can request launching url using this URL:

POST /open-api-games/v1/game-launch-url

Parameters

Request:

NameTypeDescription
clientIdstringClient id. Can be optional if client id provided through query params
platformIdstringPlatform id
sessionIdstringGame session id
gameIdstringGame id
accountIdintAccount id
deviceTypestringDevice type of user: dt_desktop, dt_mobile
currencystringCurrency of user
languagestringLanguage of user
userIdstringUser Id from platform side (for games storing history, like bets)
homeUrlstringAbsolute url of home page (will be used for home button, if present)
refillUrlstringAbsolute url of refill page (will be used for refill button, if present
countrystringCountry of user requesting game launch. ISO 3166-1 alpha-2

Response:

NameTypeDescription
apistringName of operation: “debit”, “credit”, “rollback”
isSuccessbooleanIs success?
errorstringEmpty string if isSuccess == true.
errorMsgstringError code, see “Errors” table
dataobject 
data.srcstringURL to start game
data.isSetLocationstringtrue - needs to be opened in new page, false - in iframe

Errors:

NameDescription
NO_ERRORSNo errors. Passed if isSuccess == true.
INVALID_BODYInvalid request body.
INVALID_CLIENT_IDInvalid client id.
WRONG_PLATFORM_IDWrong platform id.
UNKNOWN_ACCOUNTUnknown account id.
GAME_NOT_FOUNDSpecified game id not found.
UNSPECIFIED_LAUNCH_METHODLaunch method is unavailable.
INTERNAL_ERRORServer error.

Example

Request:

curl --location --request POST 'https://apiEndpoint/open-api-games/v1/game-launch-url' \
  --header 'Content-Type: application/json' \
  --data '{
      "platformId" : "platform-id",
      "clientId" : "client-id",
      "sessionId" : "session-id",
      "gameId" : "game-id",
      "accountId" : 111,
      "deviceType" : "dt_desktop",
      "currency" : "USD",
      "language" : "en_US",
      "userId" : "some-user-id",
      "homeUrl" : "https://example.com",
      "refillUrl" : "https://example.com/refill",
      "country": "US"
    }'

Response:

{
  "isSuccess": true,
  "error": "NO_ERRORS",
  "errorMsg": "",
  "data": {
    "src": "https://example.com/game-launch-url",
    "isSetLocation": "true"
  }
}