更新 TOTP 設置
PUT /v1/security/totp/settings:儲存帳戶的新裝置登入與提領 TOTP 偏好。
PUT /v1/security/totp/settings
儲存帳戶的新裝置登入與提領 TOTP 偏好。新裝置開關控制在新瀏覽器或 CLI 上首次登入時的 TOTP。提領標記會被儲存並回顯在帳戶上,但上游的提領守衛並不讀取它:只要帳戶綁定了驗證器,每次提領都會被要求輸入驗證器代碼,因此不要依據該標記來分支提領流程。設定變更本身需要新的 TOTP 代碼進行認證。
| 方法 | PUT |
| 路徑 | /v1/security/totp/settings |
| 認證 | 設置 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,並配一條通用文案;上游原文只寫入伺服器日誌。