跳转到内容
开发者文档 / 认证接口

重置密码

校验邮件验证码并设置新密码。请先调用“发送重置密码邮件”接口获取验证码。

POST/api/auth/forget

鉴权方式 请求头 Api-Key、Api-Secret

Content-Type application/json

请求体

参数类型必填说明
emailstring是接收验证码的邮箱
codestring是邮件验证码
newPasswordstring是至少 8 位,且至少包含一个字母和一个数字
bash
curl -X POST 'https://resource-api.xyeidc.com/api/auth/forget' \
  -H 'Api-Key: YOUR_API_KEY' \
  -H 'Api-Secret: YOUR_API_SECRET' \
  -H 'Content-Type: application/json' \
  -d '{"email":"developer@example.com","code":"123456","newPassword":"NewExample123"}'

123456 仅用于展示字段格式,请使用邮件中实际收到且尚未过期的验证码。

响应示例

json
{
  "code": 200,
  "msg": "Success!",
  "data": null
}