启用 TOTP
POST /v1/security/totp/enable:用户提交新的六位代码证明已配置验证器后,激活 TOTP。
POST /v1/security/totp/enable
用户提交新的六位代码证明已配置验证器后,激活 TOTP。这是启用向导的第 3 步。
| 方法 | POST |
| 路径 | /v1/security/totp/enable |
| 认证 | 设置 GATEWAY_AUTH_TOKEN 时需要 Authorization: Bearer <token> |
| 类别 | auth |
说明
失败时返回 { error, status, message },其中 error 是稳定的机器码。第二因子被拒会映射到一组固定值:invalid_totp、totp_required、invalid_email_code、email_code_required、verification_locked(邮箱验证码错误次数过多,message 会给出等待时长)、totp_state_conflict(账户已处于请求的状态)、totp_not_provisioned(尚未生成密钥)、rate_limited。请求体不合法时返回 400,error 按端点分别为 totp_code_required、totp_and_email_required 或 settings_payload_invalid。网关无法归类的失败保留该端点自身的 <action>_failed,并配一条通用文案;上游原文只写入服务端日志。