2.3 Login
http
POST /api/v1/user/exchange/sso/getkeyThere is no need to create a member account for the player separately. Simply call the Login API, and the system will decide automatically: if this is the player's first login, the account is created automatically; if an account already exists, the player is logged in directly.
Request Body (JSON)
| Field | Required | Type | Description |
|---|---|---|---|
| external_player_id | TRUE | string | Player ID (merchant side), up to 128 characters, uppercase English letters supported; player data is independent per environment (test / production) |
| player_name | TRUE | string | Player name (merchant side), up to 64 characters; duplicates allowed |
| currency_code | TRUE | string | Player account currency code; see the currency documentation for supported currencies |
| lang | FALSE | string | Initial game UI language, zh (Simplified Chinese), en (English), or vi (Vietnamese); if not provided, follows the browser language, and unsupported languages fall back to English; the player can still switch languages in the UI after entering |
json
{
"external_player_id": "player1",
"player_name": "player1_name",
"currency_code": "CNY",
"lang": "zh"
}Response data
json
{
"code": 0,
"message": "success",
"data": {
"temporary_key": "sso_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"redirect_url": "https://bfxdemo.com#/launch?key=...&redirect=exchange&lang=zh",
"expires_in": "600",
"currency_code": "EUR"
}
}After obtaining
redirect_url, you can jump directly to the game page.expires_inis in seconds.