Keys
Read your account's sign-in security
Whether two-step sign-in is on, since when, how many recovery codes are left, and which organisations you are in that require it.
GET
/user/securityTL;DR
| Question | Answer |
|---|---|
| What does it do? | Read your account's sign-in security. |
| What does it take? | Nothing. |
| What does it return? | Status 200 with a body of type Security. |
| What can go wrong? | 401 not signed in; 429 too many requests. Every failure uses the one error envelope. |
What it does
Whether two-step sign-in is on, since when, how many recovery codes are left, and which organisations you are in that require it.
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | The account's security. | Security |
| 401 | Not signed in. | ErrorResponse |
| 429 | Too many requests. | ErrorResponse |
Response body
A 200 answer has the type Security.
| Field | Type | Required | Description |
|---|---|---|---|
twoFactor | TwoFactorState | yes | |
twoFactor.enabled | boolean | yes | |
twoFactor.enabledAt | integer | null | yes | |
twoFactor.recoveryCodesLeft | integer | yes | |
twoFactor.requiredBy | object[] | yes | The organisations the account is in that require two-step sign-in. |
twoFactor.requiredBy[].slug | string | yes | |
twoFactor.requiredBy[].name | string | yes |
See also
| Doc | Why |
|---|---|
| API reference | Every endpoint, and the error envelope |
| Schemas | Every request and response type |
| Tool reference | The operations as callable tools |