Skip to content

Challenge

POST
/api/auth/mfa/challenge
curl --request POST \
--url https://example.com/api/auth/mfa/challenge \
--header 'Content-Type: application/json' \
--data '{ "backup_code": "example", "mfa_pending_token": "example", "otp_code": "example" }'

Complete login with a TOTP code or backup code, given the mfa_pending_token issued by POST /auth/login.

Media type application/json
MfaChallengeRequest
object
backup_code
Any of:
string
mfa_pending_token
required
Mfa Pending Token
string
otp_code
Any of:
string
>= 6 characters <= 6 characters /^\d{6}$/
Example generated
{
"backup_code": "example",
"mfa_pending_token": "example",
"otp_code": "example"
}

Successful Response

Media type application/json
Example generated
example

Validation Error

Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Example generated
{
"detail": [
{
"ctx": {},
"input": "example",
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}