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
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
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
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 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