Skip to content

Totp Enable

POST
/auth/totp/enable
curl --request POST \
--url https://example.com/auth/totp/enable \
--header 'Content-Type: application/json' \
--data '{ "code": "example" }'

Prove the authenticator works, then switch 2FA on and hand out single-use backup codes — the only time they’re ever shown.

Media typeapplication/json
TotpEnableRequest
object
code
required
Code
string
>= 6 characters <= 8 characters
Examplegenerated
{
"code": "example"
}

Successful Response

Media typeapplication/json
TotpEnableResponse
object
backup_codes
required
Backup Codes
Array<string>
Examplegenerated
{
"backup_codes": [
"example"
]
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}