Authentication

Get current user's sessions

Changed on

Returns paginated sessions for the currently authenticated user. Each session includes device info, IP addresses, and activity timestamps. The current session is marked with is_current: true.

Ordering and pagination. Without sort, results are ordered by most recent activity and paged with page/limit, returning the sessions/total/page/limit/total_pages body below. This is the legacy default and is preserved for existing clients.

Send sort=created_at to opt into the standard list contract: results are ordered by session start (newest first) and may be paged either with page/limit or by cursor with cursor/ending_before plus a bounded offset past the cursor anchor. Cursor responses use the shared data envelope with next_cursor/prev_cursor.

Unlike other list endpoints, sending limit without page does not select cursor mode here; sort=created_at is the only opt-in. Cursor pagination is rejected with 400 for the activity order, because last_activity_at changes whenever a session refreshes its token: a row that crosses the cursor anchor between two requests would be skipped and never shown. The status=expired filter is also offset-only because a session can expire above the cursor anchor during a walk. Sending that filter in cursor mode, page with cursor or ending_before, or both cursor directions returns 400.

get/auth/user/sessions

Request

  • Base URL: https://api.volcano.dev
  • URL: https://api.volcano.dev/auth/user/sessions
  • Auth: HTTP bearer

Query parameters

pageinteger

Page number (1-indexed)

limitinteger

Number of sessions per page (max 100)

sort'last_activity' | 'created_at'

Sort key. last_activity (default) orders by most recent activity and supports offset pagination only. created_at orders by session start and supports both offset and cursor pagination.

status'active' | 'expired'

Filter by whether the session can still be refreshed. Omit for every stored session, including expired ones. expired is not supported with cursor pagination.

cursorstring

Opaque keyset cursor from a previous response's next_cursor. Requires sort=created_at; mutually exclusive with page and ending_before.

ending_beforestring

Opaque keyset cursor from a previous response's prev_cursor, paging backward. Requires sort=created_at; mutually exclusive with page and cursor.

offsetinteger

Bounded number of rows to skip past the cursor anchor (the hybrid jump, maximum 100000). Ignored unless cursor or ending_before is supplied.

Response

Paginated list of user sessions

totalinteger

Total number of sessions

pageinteger

Current page number

limitinteger

Number of sessions per page

total_pagesinteger

Total number of pages

has_moreboolean

Whether a further page exists (cursor pagination only)

next_cursorstring

Opaque cursor for the next page (cursor pagination only)

prev_cursorstring

Opaque cursor for the previous page (cursor pagination only). Send as ending_before.

Example response

{
  "sessions": [
    {
      "provider": "email",
      "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)",
      "ip_address": "192.168.1.1",
      "last_ip_address": "192.168.1.100"
    }
  ],
  "data": [
    {
      "provider": "email",
      "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)",
      "ip_address": "192.168.1.1",
      "last_ip_address": "192.168.1.100"
    }
  ]
}

Changes

    • ▲

      the response's body type changed from no type to object for status

    • ▲

      the response's body type changed from no type to object for status

    • ▲

      the / response's property type changed from no type to object for status

    • ▲

      the / response's property type changed from no type to object for status

    • ○

      added the optional property to the response with the status

    • ○

      added the optional property to the response with the status

    • ○

      added the optional property // to the response with the status

    • ○

      added the optional property // to the response with the status

    • ○

      added the optional property // to the response with the status

    • ○

      added the optional property // to the response with the status

    • ○

      added the optional property // to the response with the status

    • ○

      added the optional property // to the response with the status

    • ○

      added the optional property // to the response with the status

    • ○

      added the optional property // to the response with the status

    • ○

      added the optional property // to the response with the status

    • ○

      added the optional property // to the response with the status

    • ○

      added the optional property // to the response with the status

    • ○

      added the optional property // to the response with the status

    • ○

      added the optional property // to the response with the status

    • ○

      added the optional property // to the response with the status

    • ○

      added the required property // to the response with the status

    • ○

      added the required property // to the response with the status

    • ○

      added the required property // to the response with the status

    • ○

      added the required property // to the response with the status

    • ○

      added the required property // to the response with the status

    • ○

      added the required property // to the response with the status

    • ○

      added the required property to the response with the status

    • ○

      added the required property to the response with the status

    • ○

      added the required property // to the response with the status

    • ○

      added the required property // to the response with the status

    • ○

      added the required property // to the response with the status

    • ○

      added the required property // to the response with the status

    • ○

      added the required property // to the response with the status

    • ○

      added the required property // to the response with the status

    • ▲

      the response's body type changed from object to no type for status

    • ▲

      the / response's property type changed from object to no type for status

    • ▲

      removed the required property from the response with the status

    • ▲

      removed the required property // from the response with the status

    • ▲

      removed the required property // from the response with the status

    • ▲

      removed the required property // from the response with the status

    • ▲

      removed the required property // from the response with the status

    • ●

      removed the optional property from the response with the status

    • ●

      removed the optional property // from the response with the status

    • ●

      removed the optional property // from the response with the status

    • ●

      removed the optional property // from the response with the status

    • ●

      removed the optional property // from the response with the status

    • ●

      removed the optional property // from the response with the status

    • ●

      removed the optional property // from the response with the status

    • ●

      removed the optional property // from the response with the status

    • ●

      removed the optional property // from the response with the status

    • ●

      removed the optional property // from the response with the status

    • ○

      added the new optional query request parameter cursor

    • ○

      added the new optional query request parameter ending_before

    • ○

      added the new optional query request parameter offset

    • ○

      added the new optional query request parameter sort

    • ○

      added the new optional query request parameter status

    • ○

      added the non-success response with the status

    • ○

      added the optional property to the response with the status

    • ○

      added the optional property to the response with the status

    • ○

      added the optional property to the response with the status

    • ○

      added the optional property to the response with the status