Skip to content
The API may change between versions while TTX-Zone is 0.x.

Confirm TOTP enrollment

POST
/api/v1/auth/totp/enroll/confirm
curl --request POST \
--url https://example.com/api/v1/auth/totp/enroll/confirm \
--header 'Content-Type: application/json' \
--header 'X-CSRF-Token: <X-CSRF-Token>' \
--cookie ttx_access_token=<ttx_access_token> \
--data '{ "code": "example" }'

Finish enrolling with a code from the app; returns the backup codes.

Media typeapplication/json
TotpConfirmRequest
object
code
required
Code
string
>= 6 characters <= 6 characters

Example generated

{
"code": "example"
}

Successful Response

Media typeapplication/json
TotpConfirmResponse
object
backup_codes
required
Backup Codes
Array<string>

Example generated

{
"backup_codes": [
"example"
]
}

Validation Error

Media typeapplication/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"
}
]
}