Verification Code Registration
The verifyCodeRegister API is used to register an LI PASS through email or phone verification code, without setting a password.
Request parameters
| Parameters | Type | Description | Note |
|---|---|---|---|
| account | string | Account Email or phone number (phones currently not supported) | Required |
| account_type | number | Account type 1: Email 2: Phone number (currently not supported) | Required |
| phone_area_code | string | Phone Area Code | Required if account_type is 2 |
| password | string | User password.For more details, see Password Rules. | Optional |
| user_name | string | Unique username used for login, cannot be duplicated.For more information, see Username Rules. | Optional |
| nick_name | string | User nickname for display purposes, can be duplicated | Optional |
| birthday | string | User's birthday YYYY-MM | Optional |
| region | string | Numeric codes of countries or regions as per ISO 3166-1 For example, 156 represents China, and 040 represents Austria | Optional |
| is_receive_email | number | Receive email notifications 1: Yes Other: No | Optional |
| verify_code | string | Verification code | Required |
| machine_check_type | number | This field is temporarily unavailable, please ignore. CAPTCHA Type 3: Tencent Captcha | Needed when machine validation is active on Player Network |
| tencent_response | string | Tencent Captcha response Must be converted to string, e.g.: JSON.stringify({"appid":"xxx","ret":0, "ticket":"t030...ECE*","randstr":"@BHo"}). | Required if machine_check_type is 3 |
Request sample
accountApi.verifyCodeRegister(
{
verify_code: '12345',
account:'lhmtyn47025@chacuo.net',
account_type: 1,
password:'xxxx',
user_name: 'lhmtyn47025',
nick_name: 'lhmtyn47025',
birthday:'2000-01',
region:'156',
user_lang_type: 'en',
is_receive_email: 0,
}
).then((res) => {
console.log(res);
});
Response parameters
| Parameters | Type | Description |
|---|---|---|
| ret | number | Return code 0: Request successful !=0: Request failed, refer to msg for detailed results |
| msg | string | Result Explanation |
| token | string | User authorization token |
| uid | string | LI PASS UID |
| seq | string | Data Stream Message Serial Number |
| expire | int64 | Token Expiration Time Unix Time |
Response sample
{
expire: 1639098097,
msg: "Success",
ret: 0,
seq: "1638798097-0180225310-009909-0000096715",
token: "2U6wTrNjD...8VIXE2WJiU5vzA==",
uid: "381312780823",
}