Multi-factor status
GET
/api/v1/mfa
const url = 'https://osctrl.net/api/v1/mfa';const options = {method: 'GET'};
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://osctrl.net/api/v1/mfaReturns the second factors enrolled on the calling account.
Responses
Section titled “Responses”OK
Media typeapplication/json
object
credentials
Array<object>
object
created_at
string
id
string
last_used_at
string
name
string
recovery_codes_left
integer
required
Required mirrors the deployment-wide switch so the profile page can explain why a factor cannot be removed.
boolean
totp_enabled
boolean
webauthn_available
boolean
Examplegenerated
{ "credentials": [ { "created_at": "example", "id": "example", "last_used_at": "example", "name": "example" } ], "recovery_codes_left": 1, "required": true, "totp_enabled": true, "webauthn_available": true}Unauthorized
Media typeapplication/json
object
code
string
error
string
Examplegenerated
{ "code": "example", "error": "example"}Not found
Media typeapplication/json
object
code
string
error
string
Examplegenerated
{ "code": "example", "error": "example"}Internal server error
Media typeapplication/json
object
code
string
error
string
Examplegenerated
{ "code": "example", "error": "example"}