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-gameAuthorization
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/jsonRequest body
| Field | Type | Required | Description |
|---|---|---|---|
username | string | Required | Player username on your platform. Created on first launch if it doesn't already exist. |
productId | string | Required | Provider code from ofb_game_provider (e.g. PGSOFT2, PGSOFTTHAI). |
gameCode | string | Required | Game code from ofb_game (e.g. PGSOFT2_SLOT_OishiDelights). |
callback | string | Required | Exit URL the game returns the player to when they quit. |
isMobile | boolean | Optional | Launch 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.
| Field | Type | Description |
|---|---|---|
reqId | string (uuid) | Per-request transaction id, mirrored from the inbound X-Request-Id when provided. |
code | integer | Business status code. 0 on success; otherwise an upstream error code. |
message | string | Human-readable status. "Success" on success. |
data.url | string | Single-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
| HTTP | Reason |
|---|---|
400 | Malformed JSON body, missing required field, or game not found for the given productId/gameCode. |
401 | Missing/invalid Authorization header, unknown agent, or invalid API key. |
403 | The authenticated agent has no access to this site. |
500 | Internal 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"
}
}