Bead 管理 开发者门户 · SQLite

文档 / 认证 Auth / 发送邮箱验证码

发送邮箱验证码

GET|POST /api/auth/send-code 公开
当前 mail.driver=mock:不真发信,验证码固定 1111;写入 email_codes。限流 60s。生产关 debug 后无 debug_hint。可选 lang 影响邮件/提示语言。

模拟请求

已预填本接口参数,可直接改 Body 后发送。 验证码 mock:1111;注册/登录成功后自动缓存 token。

POST

占位符 {{refresh_token}} / {{access_token}} 发送时自动替换。

点击「发送请求」查看结果

请求 Body 字段

字段说明
emailstring, 必填, 邮箱
scenestring, 必填, register | reset_password

响应 data 字段说明

字段类型 / 说明
expires_in int, 验证码有效秒数,默认 300
debug_hint string, 仅 debug+mock 时返回;文案随语言变化

完整响应示例

成功时的整包 JSON(APP 可按此解析)。统一外壳 code / message / data

{
    "code": 0,
    "message": "ok",
    "data": {
        "expires_in": 300,
        "debug_hint": "mock mode, verification code is fixed to 1111"
    }
}