Confirm TOTP enrollment
POST
/api/v1/auth/2fa/totp/confirm
const url = 'https://api.ultimateteam.ai/api/v1/auth/2fa/totp/confirm';const options = { method: 'POST', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"code":"example","secret":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”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"}Responses
Section titled “ Responses ”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>
ValidationErrorobject
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" } ]}