Guest Login
API Path
- POST
- /api/guest/login
Request Parameters
| Parameter | Name | Type | Required | Signed | Description |
|---|---|---|---|---|---|
| agent_id | Merchant ID | string | Required | Included | Merchant ID |
| platform | Platform | string | Required | Included | ios/android/h5/web |
| language | Language | string | Required | Included | Language |
| currency | Currency | string | Required | Included | Currency. Guest play always uses COIN; any other value is treated as COIN. The value sent is still included in the signature |
| timestamp | Current Timestamp | int64 | Required | Included | Timestamp when calling the API (in milliseconds, valid for ten minutes) |
| game_code | Entry Target | string | Optional | Included | Where the player lands after login; omit to enter the game lobby. Same values as Member Login - game_code Values |
| amount | balance | string | optional | Included | balance |
| callback | Callback URL | string | Optional | Included | URL called when member returning from the room |
| sign | Signature | string | Required | Excluded | See API documentation for signature algorithm |
Response Parameters
| Parameter | Name | Type | Description |
|---|---|---|---|
| code | Response Code | int | Error Code |
| message | Response Message | string | Error Message |
| data | Response Data | dict | Response Data Details |
| --url | Game Lobby URL | string | After successful login, the merchant app redirects to this URL to enter the game lobby |
| --token | User Session Token | string | User Session Token |
Request Example
curl --location 'https://staging.aig1234.com/api/guest/login' \
--header 'Content-Type: application/json' \
--data '{
"agent_id": "agent001",
"platform": "h5",
"language": "en-US",
"currency": "USD",
"amount": "1000.12",
"callback": "https://h5-uat.aig1234.com/home",
"timestamp": 1756885800474,
"sign": "3c57d95200588cab08ae29100f30636a"
}'
Response Example
{
"code": 200,
"message": "success",
"data": {
"url": "https://h5-uat4.aig1234.com/home?agent_id=agent001&uid=agent001guest_agent505_94&token=V2VBnMEDF7kdAvfQ14iiiLxAIo4kNI8b&language=USD&platform=h5¤cy=COIN&skin=1001&callback=https://h5-uat.aig1234.com/home",
"token": "V2VBnMEDF7kdAvfQ14iiiLxAIo4kNI8b"
}
}
Error Codes
200 Success
408000 Request Parameter Error
408003 Whitelist Restriction
408004 API Rate Limit
600100 Invalid Signature
600101 Invalid parameters
700101 Merchant Not Found
700103 User Not Found
700106 Login Failed
700108 User Prohibited from Login
700208 Currency Not in Merchant's Selected Currency List
700270 Bet Limits Error