Skip to content

Get my two-factor status

GET
/account/security/2fa

Shows where your two-factor authentication stands: whether you’ve started setting it up, whether it’s confirmed, and how many recovery codes you have left.

enrolled turns true as soon as you start setup with POST /account/security/2fa, but signing in only asks for a second factor once confirmed is true too. If you haven’t started, you get false, false and 0, and the timestamps are left out.

Your two-factor status.

Where your two-factor setup stands.

object
enrolled
required

true once you’ve started setup, whether or not you’ve confirmed it.

boolean
confirmed
required

true once you’ve confirmed setup with a code. Only then does signing in ask for a second factor.

boolean
enrolled_at

When the current setup was started. Starting setup again resets it.

string format: date-time
nullable
confirmed_at
string format: date-time
nullable
last_used_at

When the server last recorded accepting a code from your authenticator app during sign-in. A later sign-in step can still fail. Signing in with a recovery code doesn’t update it, and starting setup again clears it.

string format: date-time
nullable
recovery_codes_remaining
required

How many unused recovery codes your account has. It’s 0 whenever setup hasn’t been started. While a new setup waits to be confirmed, it can still count codes from an earlier one; confirming replaces them.

integer

Authentication required, missing, or invalid

object
error
required

Human-readable error summary

string
Example
the request could not be completed
Example
{
"error": "authentication required: sign in and retry with a valid session or API token"
}