Skip to main content

Change Password (resetPassword)

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

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
verify_typenumberVerification method
1: Use verification code
2: Use 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 human verification is enabled in Player Network settings
tencent_responsestringTencent Captcha response
Converted to string, such as: 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 parameters

ParametersTypeDescription
retnumberReturn code
0: Request successful
!=0: Request failed, refer to msg for detailed results
msgstringResult Explanation
seqstringSequence number of the data stream message

Response sample

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