Read own two-factor sign-in status
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, recoveryCodes
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