Skip to content

Confirm TOTP enrollment

POST
/api/v1/auth/2fa/totp/confirm
curl --request POST \
--url https://api.ultimateteam.ai/api/v1/auth/2fa/totp/confirm \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--data '{ "code": "example", "secret": "example" }'

Verify a TOTP code to activate 2FA.

Media typeapplication/json
TOTPConfirmRequest

Request to confirm TOTP enrollment with a valid code.

object
code
required
Code

6-digit TOTP code

string
secret
required
Secret

TOTP secret from enrollment

string
Examplegenerated
{
"code": "example",
"secret": "example"
}

Successful Response

Media typeapplication/json
TOTPConfirmResponse

Response after confirming TOTP enrollment.

object
message
required
Message
string
recovery_codes
required
Recovery Codes
Array<string>
Examplegenerated
{
"message": "example",
"recovery_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
Examplegenerated
{
"detail": [
{
"ctx": {},
"input": "example",
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}