Open Game
Obtain the player's game launch URL
API Information
- URL:
POST /v2/opengame - Authentication:Bearer Token
- Encryption:Requests are encrypted using AES-256-GCM; responses are returned as plaintext JSON
request
request Headers
POST /v2/opengame HTTP/1.1
Host: api.example.com
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
x-agentid: integratorNBTest04
x-timestamp: 1769746894501
x-nonce: 56ffd5ecd8a3a4457863a0bd7c298fb2
x-signature: c25f8d23704373e8776cce6d9b10f1fde091c34db80d60523c7e04ff30e54633
Request Parameters
Request Body Before Encryption
{
"deviceType": 0,
"ipaddress": "35.200.72.205",
"lang": "en",
"lobbyUrl": "https://example.com",
"gameCode": "VP_230001_1",
"launchType": 1,
"username": "testaccount01"
}
Encrypted Request Body
{
"cipherText": "G0ZMDELeJwx+7JcIfIFOLJjkSzANPu6krGM2uw==..."
}
| Field | Type | Required | Description |
|---|---|---|---|
deviceType | number | Yes | Device type: 0: PC, 1: Mobile device |
ipaddress | string | Yes | Login IP |
lang | string | Yes | Language |
gameCode | string | Yes | Game Code |
launchType | number | Yes | Play Modes |
lobbyUrl | string | No | When the system displays an error message, the specified link used for the return message |
username | string | No | Player Account |
Response
Success Response
{
"code": 0,
"message": "No error.",
"data": {
"gameLaunchHtml": null,
"gameLaunchUrl": "https://staggp.zzzstkk.com/game/230001/3.55.0?a=integratorNBTest04_VPSysDevTest010&g=230001&p=3UWzoOtmcKcdZbQnEiHwHbBn9i3w4y__R_DuvopsoYemrFfczHqZGciqR5YvDkTn...",
"mode": "real"
},
"logUUID": "23c50208-cd0f-4daa-be3c-f346da188107"
}
| Field | Type | Description |
|---|---|---|
gameLaunchHtml | string | null |
gameLaunchUrl | string | URL used to launch the game |
mode | string | Enable game mode |
logUUID | string | Request tracking ID for troubleshooting and log queries |
Error Response
When the request fails, the corresponding error code will be returned.
Error Codes
| Code | Description | Handling Suggestion |
|---|---|---|
| 5 | Game is not found | The game does not exist, has been taken offline, or does not support the specified currency. Please verify that the gameCode is correct. |
| 7 | Internal server error | An internal system error occurred. Please try again later or contact technical support. |
| 8 | The User is not exist | Member does not exist. Please create the member first. |
| 11 | Parameters error | Ensure that all request parameters are complete and correctly formatted |
| 19 | Invalid account | The account is invalid. Please check the Player Account. |
| 81 | Branch config not found | Branch configuration not found. Please contact technical support. |
| 82 | Please check siteId is for this player | Please verify that the siteId corresponds to the specified player. |
Error Response Example
{
"code": 5,
"message": "Game is not found",
"logUUID": "24cdc3b9-9fe8-44de-8391-a96863e46954"
}
{
"code": 8,
"message": "The User is not exist",
"logUUID": "24cdc3b9-9fe8-44de-8391-a96863e46954"
}
Important Notes
Special Notes
-
ipaddress Usage Restrictions:
- Only one IP address can be provided
- If
launchTypeis1(demo mode), a virtual IP may be used
-
Relationship Between username and launchType:
- When
launchTypeis1(demo mode),usernamemay be empty or omitted - When
launchTypeis0(both) or2(real),usernameis required
- When
-
lobbyUrl Format Requirements:
- If
lobbyUrlis provided, the URL must use the HTTPS protocol
- If
General Notes
-
URL Validity:
- Game URLs are typically valid for 5 minutes
- A new URL must be obtained after expiration
- Each URL can only be used once
-
Return Handling:
lobbyUrlwill be used when the player closes the game- It is recommended to set this to the game lobby page
-
Game Mode:
- When
launchTypeis 2 (real), only the real-money mode is available. - When
launchTypeis 1 (demo), only the demo mode is available. - When
launchTypeis 0 (both), players can choose between real-money mode or demo mode on the game screen. - Demo mode can be played without a player account; if an account is provided, the player can switch to real-money mode within the game.
- When
-
Concurrency Limits:
- A single member can have only one active game url at a time (dual game are not supported).
- Launching a new game will automatically close the previous url.