Confirm two-factor authentication enrollment

Activates the pending secret from POST /auth/totp/setup once a valid 6-digit code proves the authenticator holds it, and mints a fresh set of 8 recovery codes — the only time the raw codes are ever returned. 400 if there is no pending setup or the code is invalid. Shares the per-user 5 code attempts per minute limiter with setup and login phase 2.

post/auth/totp/confirm

Request

  • Base URL: https://app.yoping.me/api/v1
  • URL: https://app.yoping.me/api/v1/auth/totp/confirm
  • Auth: API key in cookie yp_session

Request body

codestring required

A 6-digit TOTP code generated from the pending secret returned by POST /auth/totp/setup.

Response

Two-factor authentication enabled; raw recovery codes returned once.

Changes

No recorded changes to this operation across all 1 revision of this API.