---
title: "Get all sessions for a user by user ID"
method: GET
path: "/environments/{environmentId}/users/{userId}/sessions"
tags: ["Users"]
---

# Get all sessions for a user by user ID

`GET /environments/{environmentId}/users/{userId}/sessions`

## Path parameters

- `environmentId` string, required
- `userId` string, required

## Query parameters

- `limit` integer
- `offset` integer
- `revoked` boolean

## Response `200`

Successful response with list of sessions

- SessionsResponse
  - `sessions` Session[], required
    - `id` string
    - `createdAt` string, date-time
    - `ipAddress` string, nullable
    - `userAgent` string, nullable
    - `revokedAt` string, date-time, nullable

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `422` — Unprocessable Entity
- `500` — Internal Server Error

---

[API](https://skmtc.net/dynamic/apis/dashboard-api.md) · [All operations](https://skmtc.net/dynamic/apis/dashboard-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/dynamic/dashboard-api/revisions/aac826315d90/schema)
