Operator API

Launches a game and returns the launch_url

post/v1/game/launch

Opens a game for the player and returns the launch_url. It takes no balance: the provider reads the balance through the wallet callback.

Authentication#

Request signed with HMAC-SHA256: headers X-Merchant-Id, X-Timestamp, X-Nonce and X-Signature. See Authentication.

Body#

application/json

FieldDescription
player_id
stringrequired
Player id at the merchant; comes back as player_id in the wallet callback
1–128 characters
game
stringrequired
Game code (GET /games)
1–128 characters
provider
string
Provider code; required when the game code exists in more than one provider
1–64 characters
currency
string
Currency (ISO 4217); must be the merchant currency. Default: the merchant's
3–8 characters
lang
string
Language (pt, es, en or a regional tag such as en-US). Default: the merchant's, otherwise pt
2–10 characters
country
string
Player country (ISO 3166-1 alpha-2). Default: the currency country (USD: none)
2–2 characters
demo
boolean
Fun mode, without wallet (only games with demo_available)
lobby_url
string (uri)
URL the game returns to on exit

Example#

# TALOS_API_HOST (without /v1), TALOS_MERCHANT and TALOS_SECRET are provided by TALOS
TS=$(($(date +%s) * 1000))
NONCE=$(openssl rand -hex 16)
REQ_PATH='/v1/game/launch'
BODY='{"player_id":"user-123","game":"fortune-tiger","lang":"pt"}'
SIG=$(printf '%s' "$TS.$NONCE.POST.$REQ_PATH.$BODY" | openssl dgst -sha256 -hmac "$TALOS_SECRET" | sed 's/^.* //')

curl -X POST "$TALOS_API_HOST$REQ_PATH" \
  -H "Content-Type: application/json" \
  -H "X-Merchant-Id: $TALOS_MERCHANT" \
  -H "X-Timestamp: $TS" \
  -H "X-Nonce: $NONCE" \
  -H "X-Signature: $SIG" \
  -d "$BODY"

Responses#

200Success

FieldDescription
success
truerequired
—
message
stringrequired
—
statusCode
numberrequired
—
data
objectrequired
—
data.launch_url
stringrequired
URL to open the game (iframe or new window)
data.game
stringrequired
—
data.provider
stringrequired
—
data.demo
booleanrequired
—
Response example
{
  "success": true,
  "message": "OK",
  "statusCode": 200,
  "data": {
    "launch_url": "https://launch.exemplo/fortune-tiger?token=eyJhbGciOi...",
    "game": "fortune-tiger",
    "provider": "PGSOFT",
    "demo": true
  }
}
HTTPCode (error.code)
400INVALID_BODYUNSUPPORTED_CURRENCYINVALID_COUNTRY
401MISSING_AUTH_HEADERSINVALID_MERCHANTMERCHANT_BLOCKEDREQUEST_EXPIREDINVALID_SIGNATURENONCE_REUSEDIP_NOT_ALLOWED
402BILLING_BALANCE_EXHAUSTEDBILLING_CREDIT_LIMIT_EXCEEDEDBILLING_INVOICE_OVERDUE
403CURRENCY_NOT_ENABLEDPRODUCT_NOT_ENABLEDGAME_NOT_ENABLEDCOUNTRY_NOT_ALLOWED
404GAME_NOT_FOUND
409WALLET_NOT_CONFIGUREDAMBIGUOUS_GAME
422PROVIDER_NOT_SUPPORTED
429RATE_LIMITED
500LAUNCH_GAME_FAILED
503AUTH_UNAVAILABLELAUNCH_FAILED

Error format and the meaning of each code in Errors.