Skip to documentation
/

getGame

POST/v1/commandsgetGame

Persist the Idempotency-Key and exact request before dispatch. Reconcile unknown outcomes before retrying.

Signature

typescript example
.ts
client.getGame(parameters: GetGameParameters, options: MutationOptions): Promise<GameSessionResponse>

Call examples

typescript example
.ts
import { AggregatorClient } from '@aggregator-network/sdk'; const apiKey = process.env.AGGREGATOR_API_KEY;if (!apiKey) throw new Error('Set AGGREGATOR_API_KEY');const client = new AggregatorClient({ apiKey }); const launch = await client.getGame(  {    gameid: 'REPLACE_WITH_CATALOGUE_ID', currency: 'USD', lang: 'en',    user_username: 'player-1001', balance: 1000,    homeurl: 'https://operator.example/lobby',    cashierurl: 'https://operator.example/cashier',  },  { idempotencyKey: 'persisted-launch-operation-001' },);// Deliver launch.response only to the requesting player.
Persist the operation key and exact request before sending. Reserve funds where required. These examples run on your backend.

Response examples

Example responses. Request options are in Try it now.

json example
.json
{  "error": 0,  "response": "https://game.example/temporary-session",  "session_id": "00000000-0000-0000-0000-000000000001"}

Before launching#

  • API Setup: scope proxy:getGame or proxy:*, production activation, game/currency access, positive GGR funding without debt, callback and both allowed return origins. Legal/commercial approval is separate.
  • Reserve player funds before dispatch. The API does not debit your wallet. Keep funds reserved while the outcome is unknown.

Request#

text example
.txt
POST https://aggregatornetwork.com/v1/commandsX-API-Key: YOUR_APPLICATION_API_KEYIdempotency-Key: launch-player1001-operation001Content-Type: application/json
json example
.json
{  "method": "getGame",  "lang": "en",  "user_username": "player-1001",  "gameid": "12/737",  "homeurl": "https://operator.example/lobby",  "cashierurl": "https://operator.example/cashier",  "currency": "USD",  "balance": 1000}

Use the exact returned catalogue ID and your approved return URLs.

FieldRequiredMeaning and bounds
user_usernameYesStable player identifier, 1–128 characters; no control characters
gameidYesExact catalogue ID, up to 255 characters
currencyYesEntitled three-letter uppercase code with provider/game coverage
balanceYesFinite JSON number from 0 through 1000000000, in the game currency
langYes2–12 characters: 2–3 lowercase letters, optionally - and 2–8 letters/digits
homeurl, cashierurlYesLobby/deposit URLs, not callbacks: absolute HTTPS, no credentials, max 2048 characters, both origins allowed
play_for_funNoCompatibility field 0 or 1, default 0; use getGameDemo for a demo
logoNoPublic HTTPS PNG option for supported Bharat Matka launches
rtpNoNumber from 0 to 100, for supported IG ORIGINALS launches

balance is a JSON number, not a string. Use currency precision; avoid floating-point money calculations. Return-origin rules.

Response#

json example
.json
{  "error": 0,  "response": "https://provider.example/temporary-launch-url",  "session_id": "00000000-0000-4000-8000-000000000001"}

Require HTTP success and numeric error: 0. Open/embed only the returned URL; keep it private. Store the operation and request ID. Player creation is optional.

session_id is a compatibility alias for the gateway request ID, not a provider-authenticated session identifier or verified callback/settlement join. Retain your local launch/reservation operation and trusted play context for reconciliation; the alias alone does not establish that context.

Recovery#

Save the key and exact request before dispatch. A timeout, UPSTREAM_OUTCOME_UNKNOWN, IDEMPOTENCY_OUTCOME_UNKNOWN, or unavailable/expired result is unresolved: reconcile it before another operation. Temporary launch URLs may not be replayable.

Keep funds reserved. Inspect Request Logs and contact support. Recovery rules · Settlements.

Was this page helpful?