Verify and finalize TOTP enrollment
POST
/v1/me/totp/enroll/verify
const url = 'https://example.com/v1/me/totp/enroll/verify';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', '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/v1/me/totp/enroll/verify \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "code": "example" }'Confirms the pending enrollment with a current code, activates the credential, and returns one-time recovery codes. Accepts both full and bootstrap JWTs.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
code
required
The current 6-digit code from the authenticator app.
string
Examplegenerated
{ "code": "example"}Responses
Section titled “Responses”TOTP enrolled; recovery codes returned once
Media typeapplication/json
Returned once when enrollment is finalized. The recovery codes are shown a single time — store them securely.
object
success
required
boolean
recovery_codes
required
Array<string>
Examplegenerated
{ "success": true, "recovery_codes": [ "example" ]}default
Section titled “default”Error response
Media typeapplication/problem+json
RFC 7807 Problem Details
object
type
Problem type slug URI
string
title
string
status
integer
detail
string
key
additional properties
any
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example"}