Skip to content

Verify 2FA code

POST
/api/v1/auth/2fa/verify

Complete login by verifying TOTP or recovery code.

Authorizations

Request Body required

Request to verify 2FA during login.

object
code
required

TOTP code or recovery code

string
two_factor_token
required

2FA token from login response

string

Responses

200

Successful Response

Response body for the login endpoint.

Attributes: access_token: A short-lived JWT access token. refresh_token: A long-lived JWT refresh token. token_type: Always ‘bearer’. two_fa_required: Whether a second factor is needed. two_fa_token: Short-lived token for 2FA verification.

object
2fa_required

Whether 2FA verification is required

boolean
2fa_token
Any of:
string
access_token

Short-lived JWT access token

string
""
refresh_token

Long-lived JWT refresh token

string
""
token_type

Token scheme, always ‘bearer’

string
default: bearer

422

Validation Error

object
detail
Array<object>
object
ctx
object
input
loc
required
Array
msg
required
string
type
required
string