A person's second factor
const url = 'https://example.com/v1/identity/users/example/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/users/example/second-factor \ --header 'Authorization: Bearer <token>'Whether they have a second factor set up, since when, how many recovery codes are left, and whether it can still be used. Never a key or a code. Tenant admins only. Mounted when the deployment keeps second factors (from 0.1.9).
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Responses
Section titled “Responses”Their 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
Examplegenerated
{ "setUp": true, "started": true, "since": "2026-04-15T12:00:00Z", "recoveryCodesLeft": 1, "usable": true, "required": true}Missing / malformed / expired / revoked bearer token.
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Not a tenant admin.
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}No user with that id under this workspace (identity-user-not-found).
object
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
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Headers
Section titled “Headers”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
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Headers
Section titled “Headers”See also
GET /v1/identity/users: List users in the workspacePOST /v1/identity/users: Add a personGET /v1/identity/users/{userId}: Get a user by idGET /v1/identity/users/{userId}/sessions: List active sessions for a user- Error code
authz-backend-unavailable - Error code
database-busy - Error code
identity-user-not-found - Error code
rate-limit-exceeded - Every error code