Get 2FA status
GET
/2fa/status
const url = 'https://auth.timetonic.com/api/2fa/status';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://auth.timetonic.com/api/2fa/status \ --header 'Authorization: Bearer <token>'Get 2FA status for authenticated user. Accepts a Bearer token OR a portal session cookie (OidcBearerOrSession middleware).
Authorizations
Section intitulée « Authorizations »Responses
Section intitulée « Responses »2FA status
Media typeapplication/json
object
success
boolean
2fa
object
enabled
boolean
methods
Array<string>
backup_codes_remaining
integer
Examplegenerated
{ "success": true, "2fa": { "enabled": true, "methods": [ "example" ], "backup_codes_remaining": 1 }}Authentication required or failed
Media typeapplication/json
object
success
boolean
error
string
message
string
Example
{ "success": false, "error": "unauthorized", "message": "Authentication required"}