重置用户密码接口

API 调用地址

{域名地址}/api/password/reset

说明:{域名地址} 需要替换成你的域名地址,如 https://www.anqicms.com/api/password/reset

目前只能通过邮箱重置用户密码,配合邮箱发送邮件功能

调用方法

POST

请求参数

字段名 类型 必填 说明
email string 邮箱地址
password string 新密码
token string 发送到邮箱的链接中的 token 值
code string 发送到邮箱的链接中的 code 值

返回参数

字段名 类型 说明
code int 错误码
msg string 错误原因说明

请求数据示例

参数
email [email protected]
password 654321
token 123456
code 123456

返回数据示例

{
  "code": 0,
  "msg": "密码重置成功"
}

错误代码

错误码 说明
0 OK
-1 错误,错误原因在 msg 中指出
1001 未登录
1002 未授权
200 API 请求 OK