getGame
/v1/commandsgetGamePersist the Idempotency-Key and exact request before dispatch. Reconcile unknown outcomes before retrying.
Signature
client.getGame(parameters: GetGameParameters, options: MutationOptions): Promise<GameSessionResponse>Call examples
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.
{ "error": 0, "response": "https://game.example/temporary-session", "session_id": "00000000-0000-0000-0000-000000000001"}Before launching#
- API Setup: scope
proxy:getGameorproxy:*, 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#
POST https://aggregatornetwork.com/v1/commandsX-API-Key: YOUR_APPLICATION_API_KEYIdempotency-Key: launch-player1001-operation001Content-Type: application/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.
| Field | Required | Meaning and bounds |
|---|---|---|
user_username | Yes | Stable player identifier, 1–128 characters; no control characters |
gameid | Yes | Exact catalogue ID, up to 255 characters |
currency | Yes | Entitled three-letter uppercase code with provider/game coverage |
balance | Yes | Finite JSON number from 0 through 1000000000, in the game currency |
lang | Yes | 2–12 characters: 2–3 lowercase letters, optionally - and 2–8 letters/digits |
homeurl, cashierurl | Yes | Lobby/deposit URLs, not callbacks: absolute HTTPS, no credentials, max 2048 characters, both origins allowed |
play_for_fun | No | Compatibility field 0 or 1, default 0; use getGameDemo for a demo |
logo | No | Public HTTPS PNG option for supported Bharat Matka launches |
rtp | No | Number 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#
{ "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.
Build your server request
/v1/commandsgetGameRequest parameters
Call example
import { AggregatorClient } from '@aggregator-network/sdk'; const client = new AggregatorClient({ apiKey: process.env.AGGREGATOR_API_KEY, baseUrl: 'https://aggregatornetwork.com',}); // Persist the key and exact request before dispatch.const idempotencyKey = process.env.AGGREGATOR_OPERATION_KEY;if (!idempotencyKey) throw new Error('Set persisted operation key'); const result = await client.getGame({ "currency": "USD", "lang": "en", "gameid": "REPLACE_WITH_CATALOGUE_ID", "homeurl": "https://operator.example/lobby", "cashierurl": "https://operator.example/cashier", "user_username": "player-1001", "balance": 1000}, { idempotencyKey });// Inspect result on your server. Keep launch URLs private.Response
Run the generated example on your server and inspect its response there.