Skip to main content

verifyCodeSignIn

The verifyCodeSignIn API is used for a player to log into LI PASS through email or phone verification code, without requiring a password.

Request Parameter

ParameterTypeDescriptionRemark
accountstringAccount
Email or phone number (currently not supported)
Required
account_typenumberAccount type
1: Email
2: Phone number (currently not supported)
Required
phone_area_codestringPhone area codeRequired when account_type is 2
verify_codestringVerification codeRequired
machine_check_typenumberThis field is temporarily unavailable, please ignore.
CAPTCHA type
3: Tencent Captcha
Required when CAPTCHA is configured on Player Network
tencent_responsestringTencent 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.verifyCodeSignIn(
{
verify_code: '12345',
account: 'lhmtyn47025@chacuo.net',
account_type: 1,
}
).then((res) => {
console.log(res);
});

Response Parameter

ParameterTypeDescription
retnumberReturn code
0: Request success
!=0: Request failure, see msg for detailed return message
msgstringReturn message
tokenstringPlayer Network SDK user authorization token
uidstringLI PASS UID
seqstringSequence number of the message in the data stream
expireint64Expiration time of the token
Unix time

Response Sample

{
expire: 1639143369,
msg: "Success",
ret: 0,
seq: "1638843369-0180225865-009373-0000156600",
token: "xxx==",
uid: "xxx",
}