Member Login
API Path
- POST
- /api/member/login
Request Parameters
| Parameter | Name | Type | Required | Signed | Description |
|---|---|---|---|---|---|
| agent_id | Merchant ID | string | Required | Included | Merchant ID |
| user_id | Merchant User ID | string | Required | Included | User ID on Merchant Side, string length minimum 3, maximum 20, Only English, numbers, and _ |
| token | User Session Token | string | Required | Included | Token generated randomly by the merchant, the string length must be greater than 8 and less than 32 |
| platform | Platform | string | Required | Included | ios/android/h5/web |
| language | Language | string | Required | Included | Language |
| currency | Currency | string | Required | Included | Currency |
| timestamp | Current Timestamp | int | Required | Included | Timestamp when calling the API (in milliseconds, valid for ten minutes) |
| game_code | game code | string | optional | Included | redirect to the room after member login |
| callback | Callback URL | string | Optional | Included | URL called when member returning from the room |
| limits | Bet Limits | dict | Optional | Excluded | In dict format, where the key is <Currency>_<GameID> and the value is a comma-separated string of ordered betLimit IDs. |
| sign | Signature | string | Required | Excluded | See API documentation for signature algorithm |
| custom_language | Language Pack Solution | string | Optional | Excluded | Used 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_codeis not provided or is empty. - Enter a specific game category page (e.g., Baccarat, Dragon Tiger, Roulette, etc.), with
game_codeformatted 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_codeformat isrand-<gameId>, for example:rand-101. - Enter a specific table, with
game_codeformatted as<gameId>-<tableId>, for example:101-DYfsRc. - Enter the multi-table betting page; when
game_codeismultibet, it redirects to the main entry for multi-table betting; whengame_codeismultibet-<gameId>, it corresponds to the multi-table betting interface for that game. - Enter a specified table in live mode, with
game_codeformatted aslive-<gameId>-<tableId>, for example:live-101-DYfsRc. - Enter a random popular table, with
game_codeformatted asrand-hot. - Enter the recommended random table, where the
game_codeformat isrand-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
| 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/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¤cy=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