Skip to main content

resetPassword

The resetPassword API is used to reset the password for an LI PASS.

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_typenumberVerification type
1: Verify with verification code
2: Verify with old password
Required
old_passwordstringOld passwordRequired when verify_type is 2
passwordstringNew password. For more information, see Password Rules.Required
verify_codestringVerification codeRequired when verify_type is 1
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.resetPassword({
account: 'xxx@gmail.com',
account_type: 1,
password: 'xxxxxxxx',
old_password: 'xxxxxxx',
verify_type: 2,
}).then(
(res) => {
console.log(res);
});

Response Parameter​

ParameterTypeDescription
retnumberReturn code
0: Request success
!=0: Request failure, see msg for detailed return message
msgstringReturn message
seqstringSequence number of the message in the data stream

Response Sample​

{
msg: "Success",
ret: 0,
seq: "1638845449-0180225310-009909-0000106697",
}