List active sessions
GET
/_torii/users/me/sessions
const url = 'https://your-app.torii.so/_torii/users/me/sessions';const options = {method: 'GET'};
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://your-app.torii.so/_torii/users/me/sessionsResponses
Section titled “ Responses ”OK
Media type application/json
Array<object>
An active end-user session in your environment.
object
id
required
Unique identifier for this session.
string format: uuid
userId
required
Identifier of the end-user this session belongs to.
string format: uuid
environmentId
required
Identifier of the environment this session belongs to.
string format: uuid
userAgent
Raw User-Agent string captured when the session was created.
string | null
ipAddress
IP address captured when the session was created.
string | null
createdAt
required
When this session was created (ISO-8601 UTC).
string format: date-time
expiresAt
required
When this session expires (ISO-8601 UTC).
string format: date-time
lastUsedAt
required
When this session was last seen by the API (ISO-8601 UTC).
string format: date-time
activeOrganizationId
Active organization pinned to this session (org_id claim on re-mint).
string | null format: uuid
impersonatedBy
Platform user behind this session when it was established via impersonation; null for normal sign-ins.
string | null format: uuid
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" }]