Skip to content

POST /api/v1/auth/email-code/send-password

POST/api/v1/auth/email-code/send-password

发送密码重置邮箱验证码

publicoperationId: emailCodeSendPassword

请求体

请求数据

Content-Type · application/json

{
  "type": "object",
  "required": [
    "email"
  ],
  "properties": {
    "email": {
      "type": "string",
      "format": "email"
    }
  }
}

请求示例

cURL
curl -X POST 'http://localhost:8080/api/v1/auth/email-code/send-password' \
  -H 'Accept: application/json'
JavaScript
const res = await fetch('http://localhost:8080/api/v1/auth/email-code/send-password', {
  method: 'POST',
  headers: {
    'Accept': 'application/json'
  },
});
const data = await res.json();
Python
import requests

res = requests.post(
    'http://localhost:8080/api/v1/auth/email-code/send-password',
    headers={'Accept': 'application/json'}
)
print(res.json())

响应

200成功

application/json

{
  "type": "object",
  "description": "通用响应包装",
  "properties": {
    "code": {
      "type": "string",
      "example": "ok"
    },
    "message": {
      "type": "string",
      "example": "ok"
    },
    "data": {}
  }
}
429发送过于频繁
503邮件服务未配置

在线调试

在线调试
凭证仅保存在当前页面内存中
自定义请求 Header