Member Registration
API Description
- Path:
/client/member/register - Method:
POST - Description: Member registration API. Register using account, password, mobile number, etc. Must carry base authentication Token (
baseToken). Upon successful registration, it will automatically log in and return the response containing member profile and Token.
Request Parameters
| Parameter Name | Type | Required | Description |
|---|---|---|---|
baseToken | String | Yes | Credentials obtained from the basic authentication API |
username | String | Yes | Member login account |
password | String | Yes | Member login password (plain text, encrypted and verified by the backend) |
mobile | String | No | Mobile number |
ddi | String | No | Country phone code (e.g., +86) |
referrerCode | String | No | Referral code |
Request Example (JSON Format)
json
{
"baseToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpX...",
"username": "testuser02",
"password": "my_password123",
"mobile": "13800138000",
"ddi": "+86",
"referrerCode": "ABCDEFGH"
}Return Parameters
| Parameter Name | Type | Description |
|---|---|---|
code | Number | Status code, 0 means success |
msg | String | Prompt message |
data.id | String | Unique ID (GUID) of the newly registered member |
data.token | String | Exclusive Member Token, subsequent business requests involving members need to carry this Token |
data.expiresAt | Number | Timestamp of Token expiration time (milliseconds) |
Return Example
json
{
"code": 0,
"msg": "Success",
"data": {
"id": "xxxx-xxxx-xxxx-xxxx",
"token": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9...",
"expiresAt": 1718000000000
}
}