Verify MFA challenge
POST
/api/mfa/verify
const url = 'http://localhost:3001/api/mfa/verify';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"challenge_id":"example","code":"example","device_name":"example","trust_device":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:3001/api/mfa/verify \ --header 'Content-Type: application/json' \ --data '{ "challenge_id": "example", "code": "example", "device_name": "example", "trust_device": true }'Verify a multi-factor authentication challenge using TOTP code or backup code
Request Bodyrequired
Section titled “Request Bodyrequired”MFA verification request
Media typeapplication/json
object
challenge_id
string
code
string
device_name
string
trust_device
boolean
Examplegenerated
{ "challenge_id": "example", "code": "example", "device_name": "example", "trust_device": true}Responses
Section titled “Responses”OK
Media typeapplication/json
object
code_type
“totp” or “backup_code”
string
device_id
string
message
string
success
boolean
Examplegenerated
{ "code_type": "example", "device_id": "example", "message": "example", "success": true}Bad Request
Media typeapplication/json
object
error
string
success
boolean
Examplegenerated
{ "error": "example", "success": true}Unauthorized
Media typeapplication/json
object
error
string
success
boolean
Examplegenerated
{ "error": "example", "success": true}Forbidden
Media typeapplication/json
object
error
string
success
boolean
Examplegenerated
{ "error": "example", "success": true}Not Found
Media typeapplication/json
object
error
string
success
boolean
Examplegenerated
{ "error": "example", "success": true}Gone
Media typeapplication/json
object
error
string
success
boolean
Examplegenerated
{ "error": "example", "success": true}Too Many Requests
Media typeapplication/json
object
error
string
success
boolean
Examplegenerated
{ "error": "example", "success": true}Internal Server Error
Media typeapplication/json
object
error
string
success
boolean
Examplegenerated
{ "error": "example", "success": true}Service Unavailable
Media typeapplication/json
object
error
string
success
boolean
Examplegenerated
{ "error": "example", "success": true}