Skip to navigation

Verify 2FA (Enable)

Verify a TOTP code from the user’s authenticator app to complete 2FA setup and enable it on the account.

Authentication: Required — Bearer token.

Request body:

  • code (required) — 6-digit TOTP code from the authenticator app

Response:

  • message — “Two-factor authentication enabled.”

Side effects: Enables 2FA on the user’s account. All future logins will require a TOTP code.

Errors:

  • 422 — Invalid verification code (wrong code, expired, or no secret set up)

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
codestringOptional

Response

OK