---
title: "Get a session by user id"
method: GET
path: "/sessions/by-user-id/{userId}"
tags: ["Session"]
---

# Get a session by user id

`GET /sessions/by-user-id/{userId}`

Get a session by the contact's external user id (`Session.userId`, the id your app passes to the SDK
identify call), not the Mongo `_id`. Responds 404 when no contact with that userId exists.

## Headers

- `project` string, required

---

[API](https://skmtc.net/gleap/apis/gleap-server.md) · [All operations](https://skmtc.net/gleap/apis/gleap-server/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gleap/gleap-server/versions/6f02af3a6c47/schema)
