Prove possession and reveal recovery codes once
const url = 'https://example.com/v1/auth/totp/activate';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"code":"example","mfa_token":"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/auth/totp/activate \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "code": "example", "mfa_token": "example" }'Activates the pending factor after verifying its code and reveals ten recovery codes once. A policy-forced enrolment also returns the completed login session.
Authorizations
Section titled “ Authorizations ”- bearerAuth
- browserSession
- None
Request Body required
Section titled “ Request Body required ”object
Example generated
{ "code": "example", "mfa_token": "example"}Responses
Section titled “ Responses ”OK
object
Single-use recovery codes, revealed only in this response.
Example generated
{ "csrf_token": "example", "expires_at": "2026-04-15T12:00:00Z", "recovery_codes": [ "example" ], "session_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "token": "example"}Request refused
object
object
With code module_not_enabled: the namespace of the module this node does not run.
Example generated
{ "error": { "code": "example", "message": "example", "module": "example" }}Request refused
object
object
With code module_not_enabled: the namespace of the module this node does not run.
Example generated
{ "error": { "code": "example", "message": "example", "module": "example" }}Request refused
object
object
With code module_not_enabled: the namespace of the module this node does not run.
Example generated
{ "error": { "code": "example", "message": "example", "module": "example" }}Request refused
object
object
With code module_not_enabled: the namespace of the module this node does not run.
Example generated
{ "error": { "code": "example", "message": "example", "module": "example" }}Request refused
object
object
With code module_not_enabled: the namespace of the module this node does not run.
Example generated
{ "error": { "code": "example", "message": "example", "module": "example" }}Request refused
object
object
With code module_not_enabled: the namespace of the module this node does not run.
Example generated
{ "error": { "code": "example", "message": "example", "module": "example" }}Request refused
object
object
With code module_not_enabled: the namespace of the module this node does not run.
Example generated
{ "error": { "code": "example", "message": "example", "module": "example" }}