clerk.get_session
Retrieve a single session from a connected Clerk application by its session id.
Call clerk.get_connected_accounts first. Pass clerk_instance_id to target a specific connection, or omit it to use the default account.
Returns session id, user_id, status, last_active_at, expire_at, client_id, created_at, and updated_at.
Cost = 3 tokens.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | Clerk session id (sess_...) to retrieve or modify. | |
| clerk_instance_id | No | Clerk instance id (ins_...) from clerk.get_connected_accounts. Omit to use the default connected account. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Clerk session id (sess_...). | |
| status | No | Current status of the session. | |
| user_id | No | Clerk user id (user_...) that owns this session. | |
| client_id | No | Clerk client id associated with this session. | |
| expire_at | No | Unix timestamp in milliseconds when this session expires. | |
| created_at | No | Unix timestamp in milliseconds when the session was created. | |
| updated_at | No | Unix timestamp in milliseconds when the session was last updated. | |
| last_active_at | No | Unix timestamp in milliseconds of the last activity on this session. |