重置密码

555

# 重置密码

Path:

/api/reset_pwd

Method: POST

Content-type: application/json; charset=utf-8

接口描述: 使用token重置密码

注意:1.70.2 及其之后版本支持该功能;

请求参数

名称 类型 示例 描述
token string "BP26TDZUZ5SVPZJ
RIHCAUVREO5EWMHHV"
问题或者令牌的返回token
pwd string "Qaz123456@" 新密码

响应参数

名称 类型 示例 描述
code int 0 错误码
msg string "success" 错误描述

请求示例

{
	"token": "BP26TDZUZ5SVPZJRIHCAUVREO5EWMHHV",
	"pwd": "Qaz123456"
}

响应示例

{
	"code": 0,
	"msg": "success"
}

错误码

code msg 描述
0 success 成功
101 password is too simple 密码过于简单
102 totp already open 令牌已开启
103 answer error 问题回答错误
104 answer is empty 答案不能为空
105 code check error 令牌码校验失败
106 json format error json格式错误
107 question not exist 问题不存在
108 totp not enable totp 未开启
109 question not enable 问题未开启
110 verification not enable 加密未开启
111 password error 密码错误
112 question is empty 问题为空
113 question or password length over limit 超出长度限制
114 question count over limit 问题超出数量限制
115 token error token 错误
116 secret error secret 错误
117 secret format error secret格式错误
118 email format error 邮箱格式错误
119 email not config 邮箱未配置
120 hotp not enable hotp未开启
121 hotp verify code timeout hotp 验证码超时
888 network error 网络错误
999 unknown error 未知错误