List user sessions
const url = 'https://api.toriiauth.eu/api/server/v1/users/01931a73-8b00-7000-8000-000000000000/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://api.toriiauth.eu/api/server/v1/users/01931a73-8b00-7000-8000-000000000000/sessions \ --header 'Authorization: Bearer <token>'Returns all active (unexpired, unrevoked) sessions for the user, ordered by most recently used.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Identifier of the user whose sessions to list.
Example
01931a73-8b00-7000-8000-000000000000Responses
Section titled “Responses”All active sessions for the user.
An active end-user session in your environment.
object
Unique identifier for this session.
Identifier of the end-user this session belongs to.
Identifier of the environment this session belongs to.
Raw User-Agent string captured when the session was created.
IP address captured when the session was created.
When this session was created (ISO-8601 UTC).
When this session expires (ISO-8601 UTC).
When this session was last seen by the API (ISO-8601 UTC).
Active organization pinned to this session (the o claim on re-mint).
Platform user behind this session when it was established via impersonation; null for normal sign-ins.
Example
[ { "id": "01931a74-1234-7000-8000-000000000000", "userId": "01931a73-8b00-7000-8000-000000000000", "environmentId": "01931a72-0000-7000-8000-000000000000", "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 14_6_0) AppleWebKit/537.36", "ipAddress": "203.0.113.42", "createdAt": "2026-05-16T09:30:00Z", "expiresAt": "2026-05-23T09:30:00Z", "lastUsedAt": "2026-05-16T11:42:00Z" }]Missing or invalid secret key.
object
object
Examplegenerated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "instance": "https://example.com", "properties": { "additionalProperty": "example" }}User belongs to a different environment.
object
object
Examplegenerated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "instance": "https://example.com", "properties": { "additionalProperty": "example" }}