Send Email Code

发送注册邮箱验证码。同一邮箱 60 秒内只能请求一次;验证码 5 分钟内有效。

返回:成功是 success;命中冷却返回 40008;邮箱已注册返回 40003;发信失败返回 50011。 副作用:写 Redis(验证码 + 冷却键)、向外部邮件服务发起发送请求。

顺序上先写 Redis 再发信:这样即使发信失败,冷却键也已经落下, 用户必须等冷却结束才能重试 —— 用「可能多等 60 秒」换「不会因发信故障被无限刷」。 另外,对已注册邮箱直接返回 email_exists,等于暴露了「该邮箱是否已注册」, 这是产品上为了方便用户(提示去登录)而接受的取舍。

post/auth/sendEmailCode

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/sendEmailCode
  • Auth: none declared

Query parameters

langstring

Request body

emailstring required

Response

Successful Response

unknown required

Changes

No recorded changes to this operation across all 2 revisions of this API.