Skip to documentation
/

getGameDemo

POST/v1/commandsgetGameDemo

Signature

typescript example
.ts
client.getGameDemo(parameters: GetGameDemoParameters, options?: RequestOptions): 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 demo = await client.getGameDemo({  gameid: 'REPLACE_WITH_CATALOGUE_ID',  currency: 'USD',  lang: 'en',  homeurl: 'https://operator.example/lobby',  cashierurl: 'https://operator.example/cashier',});// Deliver demo.response only to the requesting player.

Response examples

Example responses. Request options are in Try it now.

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

Request#

Scope: proxy:getGameDemo or proxy:*. Use a live Game API key with eligible demo activation and game/currency access. Save both HTTPS return origins in API Setup; an IP allowlist or client configuration cannot replace them. Omit Idempotency-Key.

json example
.json
{  "method": "getGameDemo",  "lang": "en",  "gameid": "REPLACE_WITH_CATALOGUE_ID",  "homeurl": "https://operator.example/lobby",  "cashierurl": "https://operator.example/cashier",  "currency": "USD"}
FieldRequirement
gameidExact catalogue ID, up to 255 characters
currencyEntitled three-letter uppercase code
langBCP-47-style tag, 2–12 characters; e.g. en or pt-BR
homeurl, cashierurlAbsolute HTTPS, no credentials, max 2048 characters; both origins allowlisted

Language tags use two or three lowercase letters, optionally followed by a hyphen and 2–8 letters or digits. Supplied URLs are limited to 2048 characters.

No player, balance or monetary settlements. Trial support varies by game.

Response#

Require HTTP success and numeric error: 0. Open only the temporary returned URL; never publish it. Demo access is not production access.

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

session_id is a compatibility alias for the gateway request ID, not a provider-authenticated session identifier or verified callback/settlement join. Demo launches still create no player, balance or monetary settlements.

Unsupported trial play returns HTTP 200 with:

json example
.json
{  "error": 1008,  "message": "Demo play is not supported for this game"}

Choose another game; this is not an outage to retry. Cached demo: false is incomplete and does not itself block an authorized trial. Access and rate limits still apply.

SANDBOX_UPSTREAM_NOT_CONFIGURED: replace a retired test key with a live Game API key.

Was this page helpful?