List active sessions for a user
const url = 'https://example.com/v1/identity/users/example/sessions';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/sessions \ --header 'Authorization: Bearer <token>'A tenant admin, or the person themselves. Returns the wire-safe IdentitySessionSummary shape — provider access-token + refresh-token never cross the wire, even to admins. Unknown user id returns an empty list (call GET /v1/identity/users/:userId first to distinguish “no sessions” from “no user”). A key or session limited to a project is refused, 403 permission-denied, even for its own person: their sessions reach every project.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Responses
Section titled “Responses”Page of sessions.
object
Wire-safe subset of a session. Excludes provider access-token / refresh-token — those never cross the wire, even to admins.
object
Examplegenerated
{ "data": [ { "sessionId": "example", "userId": "example", "providerId": "example", "createdAt": "2026-04-15T12:00:00Z", "expiresAt": "2026-04-15T12:00:00Z", "scopes": [ "example" ], "revokedAt": "2026-04-15T12:00:00Z" } ], "hasMore": true, "nextCursor": "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" }}Someone else’s sessions, and not a tenant admin; or a key or session limited to a project.
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
GET /v1/identity/users: List users in the workspacePOST /v1/identity/users: Add a personGET /v1/identity/users/{userId}: Get a user by idPOST /v1/identity/users/{userId}/unregister: Remove a person- Error code
authz-backend-unavailable - Error code
database-busy - Error code
rate-limit-exceeded - Every error code