Seamless API doc Custom

Launch Game POST

Generate a launch URL for a player on the given product/game. The response data.url is a single-use redirect URL — open it in the browser (or webview) to start the game session.

Endpoint

http
POST {{ API_URL }}/seamless/launch-game

Authorization

HTTP Basic Authentication. The Authorization header value is the Base64 encoding of {agent_username}:{api_key}.

http
Authorization: Basic Base64(agent_username:api_key)
Content-Type: application/json

Request body

FieldTypeRequiredDescription
usernamestringRequiredPlayer username on your platform. Created on first launch if it doesn't already exist.
productIdstringRequiredProvider code from ofb_game_provider (e.g. PGSOFT2, PGSOFTTHAI).
gameCodestringRequiredGame code from ofb_game (e.g. PGSOFT2_SLOT_OishiDelights).
callbackstringRequiredExit URL the game returns the player to when they quit.
isMobilebooleanOptionalLaunch the mobile variant of the game. Defaults to desktop when omitted.

Example request body

json
{
  "username": "john_doe",
  "productId": "PGSOFT2",
  "gameCode": "PGSOFT2_SLOT_OishiDelights",
  "callback": "https://example.com/callback",
  "isMobile": true
}

Response

On success the service returns 200 OK with the launch URL.

FieldTypeDescription
reqIdstring (uuid)Per-request transaction id, mirrored from the inbound X-Request-Id when provided.
codeintegerBusiness status code. 0 on success; otherwise an upstream error code.
messagestringHuman-readable status. "Success" on success.
data.urlstringSingle-use launch URL. Redirect the player here to start the game.

Example success response

json
{
  "reqId": "5557191a-4421-4753-a757-8ca7b45828dc",
  "code": 0,
  "message": "Success",
  "data": {
    "url": "https://test.ambsuperapi.com/seamless/directLogin?token=..."
  }
}

Errors

HTTPReason
400Malformed JSON body, missing required field, or game not found for the given productId/gameCode.
401Missing/invalid Authorization header, unknown agent, or invalid API key.
403The authenticated agent has no access to this site.
500Internal server error while resolving the player, game, or upstream launch URL.

Example error response (401 Unauthorized)

json
{
  "reqId": "edba5aca-d6d8-4e10-a55e-971cc3facb0b",
  "code": 401,
  "exception": {
    "response": {
      "statusCode": 401,
      "message": "Unauthorized. Invalid API key: 851d8beb-2055-4107-bd77-63efd76fdead",
      "error": "Unauthorized"
    },
    "status": 401,
    "message": "Unauthorized. Invalid API key: 851d8beb-2055-4107-bd77-63efd76fdead"
  },
  "message": {
    "statusCode": 401,
    "message": "Unauthorized. Invalid API key: 851d8beb-2055-4107-bd77-63efd76fdead",
    "error": "Unauthorized"
  }
}