Skip to main content

Member Login

API Path

  • POST
  • /api/member/login

Request Parameters

ParameterNameTypeRequiredSignedDescription
agent_idMerchant IDstringRequiredIncludedMerchant ID
user_idMerchant User IDstringRequiredIncludedUser ID on Merchant Side, string length minimum 3, maximum 20, Only English, numbers, and _
tokenUser Session TokenstringRequiredIncludedToken generated randomly by the merchant, the string length must be greater than 8 and less than 32
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
callbackCallback URLstringOptionalIncludedURL called when member returning from the room
limitsBet LimitsdictOptionalExcludedIn dict format, where the key is <Currency>_<GameID> and the value is a comma-separated string of ordered betLimit IDs.
signSignaturestringRequiredExcludedSee API documentation for signature algorithm
custom_languageLanguage Pack SolutionstringOptionalExcludedUsed for customizing Bet Play language packs, custom_language=en-US>en-play
tip

Players can log in to the game using various methods, with game_code controlling the redirection target; if not provided or does not match the rules, it defaults to the game lobby.

  • Enter the game lobby (default) when game_code is not provided or is empty.
  • Enter a specific game category page (e.g., Baccarat, Dragon Tiger, Roulette, etc.), with game_code formatted as <gameId>, for example: 101.
  • Enter a specified game category's random table (e.g., random tables for categories like Baccarat, Dragon Tiger, Roulette, etc.), where the game_code format is rand-<gameId>, for example: rand-101.
  • Enter a specific table, with game_code formatted as <gameId>-<tableId>, for example: 101-DYfsRc.
  • Enter the multi-table betting page; when game_code is multibet, it redirects to the main entry for multi-table betting; when game_code is multibet-<gameId>, it corresponds to the multi-table betting interface for that game.
  • Enter a specified table in live mode, with game_code formatted as live-<gameId>-<tableId>, for example: live-101-DYfsRc.
  • Enter a random popular table, with game_code formatted as rand-hot.
  • Enter the recommended random table, where the game_code format is rand-recommend.
  • The <gameId> list and <tableId> list can be found in the appendices .
tip
  • Usage of the custom_language parameter: custom_language=A>B,C>D indicates that the original language package A is replaced with language package B, and the original language package C is replaced with language package D. Multiple replacements are separated by commas.

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/member/login' \
--header 'Content-Type: application/json' \
--data '{
"agent_id": "agent001",
"user_id": "uid001",
"token": "tokena8c2aaef3880162a",
"platform": "h5",
"language": "en-US",
"currency": "VND2",
"timestamp": 1734417873301,
"limits": {
"USD_101": "21**01,21**02,21**03",
},
"game_code": "101-DYfsRc",
"callback": "https://h5-uat.aig1234.com/home",
"sign": "7776e923ffee88bbd5293fa8ad4a9919"
}'

Response Example

{
"code": 200,
"message": "success",
"data": {
"url": "https://h5-uat.aig1234.com/home?agent_id=agent001&uid=uid001&token=tokena8c2aaef3880162a&language=en-US&platform=h5&currency=VND2?game_code=101-DYfsRc&callback=https://h5-uat.aig1234.com/home",
"token": "tokena8c2aaef3880162a"
}
}

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