Get two-factor status
curl --request GET \
--url https://my.server.express/api/v1/auth/2fa/totp \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://my.server.express/api/v1/auth/2fa/totp', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://my.server.express/api/v1/auth/2fa/totp"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"success": true,
"data": {
"passkeys": 1,
"totp": true,
"backupCodesRemaining": 1,
"required": true,
"enrolmentPending": true
}
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}Auth
Get two-factor status
Which second factors the signed-in account has. required is true when a password alone no longer signs in. enrolmentPending means setup was started but never confirmed — that doesn’t count as a factor.
GET
/
v1
/
auth
/
2fa
/
totp
Get two-factor status
curl --request GET \
--url https://my.server.express/api/v1/auth/2fa/totp \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://my.server.express/api/v1/auth/2fa/totp', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://my.server.express/api/v1/auth/2fa/totp"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"success": true,
"data": {
"passkeys": 1,
"totp": true,
"backupCodesRemaining": 1,
"required": true,
"enrolmentPending": true
}
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}