Skip to main content

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

ParametersTypeDescriptionNote
accountstringAccount
Email or phone number (phones currently not supported)
Required
account_typenumberAccount type
1: Email
2: Phone number (currently not supported)
Required
phone_area_codestringPhone Area CodeRequired if account_type is 2
passwordstringUser password.For more details, see Password Rules.Optional
user_namestringUnique username used for login, cannot be duplicated.For more information, see Username Rules.Optional
nick_namestringUser nickname for display purposes, can be duplicatedOptional
birthdaystringUser's birthday
YYYY-MM
Optional
regionstringNumeric codes of countries or regions as per ISO 3166-1
For example, 156 represents China, and 040 represents Austria
Optional
is_receive_emailnumberReceive email notifications
1: Yes
Other: No
Optional
verify_codestringVerification codeRequired
machine_check_typenumberThis field is temporarily unavailable, please ignore.
CAPTCHA Type
3: Tencent Captcha
Needed when machine validation is active on Player Network
tencent_responsestringTencent 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

ParametersTypeDescription
retnumberReturn code
0: Request successful
!=0: Request failed, refer to msg for detailed results
msgstringResult Explanation
tokenstringUser authorization token
uidstringLI PASS UID
seqstringData Stream Message Serial Number
expireint64Token Expiration Time
Unix Time

Response sample

{
expire: 1639098097,
msg: "Success",
ret: 0,
seq: "1638798097-0180225310-009909-0000096715",
token: "2U6wTrNjD...8VIXE2WJiU5vzA==",
uid: "381312780823",
}