---
title: "Send Reset Password Email"
method: POST
path: "/auth/sendResetPasswordEmail"
---

# Send Reset Password Email

`POST /auth/sendResetPasswordEmail`

## Request

- Base URL: `https://api.twtapi.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.twtapi.com/auth/sendResetPasswordEmail`
- Auth: none declared

发起找回密码：校验图形验证码后生成一次性重置 token。

返回：success(reset_email_sent)；邮箱不存在返回 40401。
副作用：写 Redis（reset_token:{token} -> user_id，TTL 1800 秒），并写日志。

注意：目前真正的邮件通道还没接上，token 只打在日志里（见下方 TODO），
也就是说这个接口现在只能靠运维从日志里取链接；同时「邮箱不存在返回 404」
同样会暴露账号是否注册。

## Query parameters

- `lang` string

## Request body

- SendResetEmailRequest: 发送重置密码邮件，同样需要图形验证码防刷。
  - `email` string, required
  - `captcha` string, required

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/twtapi/apis/twtapi-backend.md) · [All operations](https://skmtc.dev/twtapi/apis/twtapi-backend/llms.txt) · [OpenAPI document](https://skmtc.dev/twtapi/apis/twtapi-backend/revisions/5295976febaf?raw)
