My second factor
const url = 'https://example.com/v1/identity/me/second-factor';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/v1/identity/me/second-factor \ --header 'Authorization: Bearer <token>'Whether you have a second factor set up (an authenticator app), since when, how many recovery codes are left, and whether your workspace requires one. From a session only: 400 auth-not-session-token with an API key. Mounted when the deployment keeps second factors (from 0.1.9). A session limited to a project is refused, 403 permission-denied: your second factor reaches every project.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Your second factor.
A person’s second factor, and whether their workspace requires one. With setUp, since, recoveryCodesLeft and usable are given; without it, started. Never a key or a code.
object
A key was given to set one up, and isn’t confirmed yet.
false: its key can’t be opened any more (the sign-in secret changed past it). A recovery code still works, as does setting it up again, or an admin removing it.
The workspace requires a second factor at sign-in.
Examplegenerated
{ "setUp": true, "started": true, "since": "2026-04-15T12:00:00Z", "recoveryCodesLeft": 1, "usable": true, "required": true}Not a session (auth-not-session-token).
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Missing / malformed / expired / revoked bearer token.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}A session limited to a project (permission-denied).
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}rate-limit-exceeded with details.limit: "api-requests", on a runtime that sets workspace limits (Kindgi Cloud): this workspace’s limit on API requests a minute is reached, so the request wasn’t run; Retry-After says when to send it again.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Headers
Section titled “Headers”Whole seconds to wait before sending the request again, at least 1. Sent with the codes the answer names as sending it, so it may be absent.
The database was too busy to answer in time (database-busy), or the authorization store couldn’t be reached (authz-backend-unavailable); Retry-After (whole seconds) says when to try again.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Headers
Section titled “Headers”Whole seconds to wait before sending the request again, at least 1. Sent with the codes the answer names as sending it, so it may be absent.
See also
POST /v1/identity/me/second-factor: Start setting up a second factorPOST /v1/identity/me/second-factor/confirm: Confirm a new second factorPOST /v1/identity/me/second-factor/recovery-codes: New recovery codesPOST /v1/identity/me/second-factor/remove: Take my second factor off- Error code
auth-not-session-token - Error code
authz-backend-unavailable - Error code
database-busy - Error code
permission-denied - Error code
rate-limit-exceeded - Every error code