---
title: "Read own two-factor sign-in status"
type: reference
method: GET
path: /rest-api/user-preference/two-factor.do
tag: "Users"
---

# Read own two-factor sign-in status

`GET https://YOUR-NETWORK-DOMAIN/rest-api/user-preference/two-factor.do`

Whether the authenticated user's sign-in asks for a second factor, and what the network's policy asks of this account: enabled, methods (EMAIL, TOTP, PASSKEY), levels (each method's security level: PASSKEY HIGH, TOTP and TELEGRAM MEDIUM, EMAIL LOW, RECOVERY_CODE BACKUP), defaultMethod, recoveryCodesLeft, verifications (how many methods the user asks of itself at sign-in), passkeys (each {id, name, host, createdAt, lastUsedAt}), required (the user's role must use two-factor sign-in), enforced (requiredFrom has come: the user cannot sign in without it), minLevel (the level the strongest verification must have), requiredVerifications (how many different methods the role asks for), requiredFrom (yyyy-MM-dd) and satisfied (what is set up can give what the role asks). Methods and passkeys are set up and removed in the console's Preferences only; there is no API to change them. Requires authentication.

## Responses

- `200` — {success, twoFactor: {enabled, methods, levels, defaultMethod, recoveryCodesLeft, verifications, passkeys, required, enforced, minLevel, requiredVerifications, requiredFrom, satisfied}}
- `400` — Bad request — invalid or missing parameters
- `401` — Unauthorized — authentication error
- `403` — Forbidden — insufficient permissions

## Example request

```bash
curl --request GET \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/user-preference/two-factor.do' \
  --header 'X-Api-Key: YOUR_API_KEY'
```

Source: https://epom.com/ad-server/docs/api/users/get-user-preference-two-factor