Reset Password
# Reset Password
Path:
/api/reset_pwd
Method: POST
Content-type: application/json; charset=utf-8
API Description: This can be used to reset password using a token.
Note: This feature is supported in version 1.70.2 and later.
Request
Name | Type | Example | Description |
---|---|---|---|
token | string | "BP26TDZUZ5SVPZJ RIHCAUVREO5EWMHHV" | Token returned from question |
pwd | string | "Qaz123456@" | New password |
Response
Name | Type | Example | Description |
---|---|---|---|
code | int | 0 | Error code |
msg | string | "success" | Error description |
Request Example
{
"token": "BP26TDZUZ5SVPZJRIHCAUVREO5EWMHHV",
"pwd": "Qaz123456"
}
Response Example
{
"code": 0,
"msg": "success"
}
Error Codes
code | msg | Description |
---|---|---|
0 | success | Success |
101 | password is too simple | The password is too simple |
102 | totp already open | Token is already enabled |
103 | answer error | Incorrect answer to the question |
104 | answer is empty | The answer cannot be empty |
105 | code check error | Token code verification failed |
106 | json format error | JSON format error |
107 | question not exist | Question does not exist |
108 | totp not enable totp | TOTP is not enabled |
109 | question not enable | Question is not enabled |
110 | verification not enable | Encryption is not enabled |
111 | password error | Incorrect password |
112 | question is empty | The question is empty |
113 | question or password length over limit | The question or password exceeds the length limit |
114 | question count over limit | The number of questions has exceeded the limit |
115 | token error | Token error |
116 | secret error | Secret error |
117 | secret format error | Secret format error |
118 | email format error | Email format error |
119 | email not config | Email is not configured |
120 | hotp not enable | HOTP is not enabled |
121 | hotp verify code timeout | HOTP verification code has expired |
888 | network error | Network error |
999 | unknown error | Unknown error |