List Active Sessions
Lists the calling user's own active (non-expired) sessions, most-recently-active first. The session matching the credential on this request is flagged is_current. The session token (JWT) is never returned.
Auth model. Sessions are JWT + a global token_version; there is no per-request session lookup. A session row is therefore a record of a sign-in — deleting one (see Revoke Session) is record-only and that device's token keeps working until it expires. For an immediate, effective sign-out of other devices use Sign Out Other Sessions.
Query parameters
page int
Optional. 1-based page number. Omit it to get every session in one response.
page_size int
Optional. Sessions per page when
page is sent. Default 15, capped at 200.Response (200 OK)
sessions object[]
The sessions (fields below).
[] when there are none.page, page_size int
The page returned and the effective page size. Both
0 when page was not sent (the whole list).total int
Number of active sessions across all pages.
Each session:
sessions[].uuid string (uuid)
The session's public id — use in DELETE /v1/user/sessions/{uuid}.
sessions[].user_uuid string (uuid)
The
uuid of the user the session belongs to. This endpoint only returns the caller's own sessions, so it always equals the caller's own uuid.sessions[].device string
Parsed device/browser (e.g.
Safari on iPhone).sessions[].ip_address string
Real client IP captured at sign-in.
sessions[].location string
ISO-3166 alpha-2 country code (e.g.
FI).sessions[].location_detail string
"ISP · timezone". May be empty.sessions[].user_agent string
Raw User-Agent string.
sessions[].created_at, last_activity, expires_at datetime
RFC 3339 UTC timestamps.
sessions[].is_current bool
true for the session presenting the credential on this request.Deprecated: until the sunset this response also carries the legacy integer id and *_id fields. Don't use them; read uuid and the *_uuid fields.
Errors
401 Unauthorized
Missing or invalid auth.
Request
curl "https://api.ngris.com/v1/user/sessions?page=1&page_size=15" \
-H "X-API-KEY: <your_api_key>"
Response — 200 OK
{
"sessions": [
{
"uuid": "019a7b69-5ec2-726f-a2e6-bddaef24ae2f",
"user_uuid": "019a52c2-ca1e-78ba-ab5c-50362cc29134",
"device": "Chrome on macOS",
"ip_address": "203.0.113.24",
"location": "FI",
"location_detail": "Example ISP · Europe/Helsinki",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36",
"created_at": "2026-05-20T10:00:00Z",
"last_activity": "2026-05-29T08:14:02Z",
"expires_at": "2026-06-19T10:00:00Z",
"is_current": true
}
],
"page": 1,
"page_size": 15,
"total": 1
}
Was this helpful?