VerifyCodeRegister
The verifyCodeRegister API is used to register for an LI PASS through email or phone verification code, without having to set a password.
Request Parameter
| Parameter | Type | Description | Remark |
|---|---|---|---|
| account | string | Account Email or phone number (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 when account_type is 2 |
| password | string | User password. For more information, see Password Rules. | Optional |
| user_name | string | Unique username used for login, cannot be repeated. For more information, see Username Rules. | Optional |
| nick_name | string | Repeatable user nickname for display | Optional |
| birthday | string | User birthday YYYY-MM | Optional |
| region | string | ISO 3166-1 numeric code for country or region For example 156 for China, 040 for Austria | Optional |
| is_receive_email | number | Whether to receive email notifications 1: Receiving others: Not receiving | Optional |
| verify_code | string | Verification code | Required |
| machine_check_type | number | This field is temporarily unavailable, please ignore. CAPTCHA type 3: Tencent Captcha | Required when CAPTCHA is configured on Player Network |
| tencent_response | string | Tencent Captcha response value Converts the value to string, for example, JSON.stringify({"appid":"xxx","ret":0, "ticket":"t030...ECE*","randstr":"@BHo"}). | Required when 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 Parameter
| Parameter | Type | Description |
|---|---|---|
| ret | number | Return code 0: Request success !=0: Request failure, see msg for detailed return message |
| msg | string | Return message |
| token | string | Player Network SDK user authorization token |
| uid | string | LI PASS UID |
| seq | string | Sequence number of the message in the data stream |
| expire | int64 | Expiration time of the token Unix time |
Response Sample
{
expire: 1639098097,
msg: "Success",
ret: 0,
seq: "1638798097-0180225310-009909-0000096715",
token: "2U6wTrNjD...8VIXE2WJiU5vzA==",
uid: "381312780823",
}