Totp Enable
POST
/auth/totp/enable
const url = 'https://example.com/auth/totp/enable';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"code":"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://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.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
TotpEnableRequest
object
code
required
Code
string
Examplegenerated
{ "code": "example"}Responses
Section titled “Responses”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>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}