Game launch

POST /v1/game/launch opens a game for a player and returns the launch_url. The same route serves slots, live casino and the sportsbook.

Request#

FieldRequiredDescription
player_idyesPlayer id in your system (1–128 characters). It is the player_id returned in the wallet callbacks.
gameyesGame code, from GET /v1/games. For the sportsbook: "sportsbook".
providernoProvider code. Required when the same game code exists in more than one provider (AMBIGUOUS_GAME).
currencynoCurrency (ISO 4217). It must be the merchant currency; default: the merchant's.
langnoLanguage (pt, es, en or a regional tag such as en-US). Default: the merchant language; without one, pt.
countrynoPlayer country, ISO 3166-1 alpha-2 (e.g. MX). Default: the currency country. See Currencies, languages and countries.
demonotrue opens in fun mode, without wallet (only games with demo_available; the sportsbook has none).
lobby_urlnoURL the game returns to when the player leaves.

The game gets no balance at launch: the provider queries the balance through the wallet callback (action: "balance") as soon as it opens.

import { talos } from './talos' // see Authentication

const res = await talos('POST', '/v1/game/launch', {
  player_id: 'user-123',
  game: 'fortune-tiger', // code from GET /v1/games
  lang: 'en-US',
  lobby_url: 'https://your-site.com/casino'
})

if (!res.success) throw new Error(`${res.error.code}: ${res.message}`)
// open res.data.launch_url in an iframe or a new window

Response#

JSON
{
  "success": true,
  "message": "Jogo iniciado com sucesso",
  "statusCode": 200,
  "data": {
    "launch_url": "https://...",
    "game": "fortune-tiger",
    "provider": "PGSOFT",
    "demo": false
  }
}
  • Open the launch_url in an iframe (or in a new window on mobile). It is for immediate use: generate a new one on every open, do not store it for reuse.
  • If a provider has more than one integration source, TALOS automatically tries the next one when the first does not open the game. It is transparent on your side.
  • The message comes in Portuguese; always decide by the fields and by error.code.

Sportsbook#

For the sportsbook use game: "sportsbook". The launch_url has the format:

https://<sportsbook>/<language>/?jwt=<token>&brand=<brand>

The jwt is a short-lived token (10 minutes) and single-use: the sportsbook exchanges it for a session on the first access. Instead of opening the URL directly, use the sportsbook SDK, which takes this token and handles renewal when the session expires.

  • The sportsbook has no fun mode: demo: true fails (LAUNCH_FAILED).
  • The sportsbook product must be enabled on the merchant (PRODUCT_NOT_ENABLED).

Errors#

HTTPCodeCause
400UNSUPPORTED_CURRENCYcurrency is not one of the supported currencies.
400INVALID_COUNTRYcountry is not a valid ISO 3166-1 alpha-2 code.
403CURRENCY_NOT_ENABLEDcurrency differs from the merchant currency — use the merchant of that currency (same group).
403PRODUCT_NOT_ENABLEDThe game type (slot, live, sportsbook) is not enabled on the merchant.
404GAME_NOT_FOUNDGame does not exist, is inactive or belongs to an inactive provider.
409WALLET_NOT_CONFIGUREDThe merchant has no walletUrl yet (only with demo: false).
409AMBIGUOUS_GAMEThe code exists in more than one provider; send provider.
422PROVIDER_NOT_SUPPORTEDThe game provider has no launch integration.
422VALIDATION_ERRORBody does not match the schema (missing required field, length, format).
500LAUNCH_GAME_FAILEDInternal error; try again.
502LAUNCH_FAILEDThe provider could not open the game.

See also the authentication errors and the general format in Errors.