Skip to main content

Guest Login

API Path

  • POST
  • /api/guest/login

Request Parameters

ParameterNameTypeRequiredSignedDescription
agent_idMerchant IDstringRequiredIncludedMerchant ID
platformPlatformstringRequiredIncludedios/android/h5/web
languageLanguagestringRequiredIncludedLanguage
currencyCurrencystringRequiredIncludedCurrency
timestampCurrent TimestampintRequiredIncludedTimestamp when calling the API (in milliseconds, valid for ten minutes)
game_codegame codestringoptionalIncludedredirect to the room after member login
amountbalancestringoptionalIncludedbalance
callbackCallback URLstringOptionalIncludedURL called when member returning from the room
signSignaturestringRequiredExcludedSee API documentation for signature algorithm

Response Parameters

ParameterNameTypeDescription
codeResponse CodeintError Code
messageResponse MessagestringError Message
dataResponse DatadictResponse Data Details
--urlGame Lobby URLstringAfter successful login, the merchant app redirects to this URL to enter the game lobby
--tokenUser Session TokenstringUser 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&currency=VND2&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
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