Client Sessions

The client_session Object

Represents a client sessionarrow-up-right. If you want to restrict your users' access to their own devices, use client sessions.

You create each client session with a custom user_identifier_key. Normally, the user_identifier_key is a user ID that your application provides.

When calling the Seam API from your backend using an API key, you can pass the user_identifier_key as a parameter to limit results to the associated client session. For example, /devices/list?user_identifier_key=123 only returns devices associated with the client session created with the user_identifier_key 123.

A client session has a token that you can use with the Seam JavaScript SDK to make requests from the client (browser) directly to the Seam API. The token restricts the user's access to only the devices that they own.

See also Get Started with Reactarrow-up-right.

A client session resource.

{
  "client_session_id": "c2cbd177-1ace-414b-bb1e-9f129e4a05c1",
  "connect_webview_ids": ["550e8400-e29b-41d4-a716-446655440000"],
  "connected_account_ids": ["f47ac10b-58cc-4372-a567-0e02b2c3d479"],
  "created_at": "2025-06-15T16:54:17.946309Z",
  "customer_id": "77eccc4e-c8bc-4c7d-b83c-cb853ed3bade",
  "device_count": 1,
  "expires_at": "2025-06-17T16:54:17.946309Z",
  "token": "seam_cst1891oqCmB_6dBwV8PJ2Fsoe9dWYVyMfVHq",
  "user_identifier_key": "user_id_1",
  "user_identity_id": "a6e93f84-565e-47d7-8908-1ca71ada373c",
  "user_identity_ids": ["a6e93f84-565e-47d7-8908-1ca71ada373c"],
  "workspace_id": "b887bf84-9849-4454-a562-cf84293d9781"
}

Properties

client_session_id UUID

ID of the client sessionarrow-up-right.


connect_webview_ids List of UUIDs

IDs of the Connect Webviewsarrow-up-right associated with the client sessionarrow-up-right.


connected_account_ids List of UUIDs

IDs of the connected accountsarrow-up-right associated with the client sessionarrow-up-right.


created_at Datetime

Date and time at which the client sessionarrow-up-right was created.


customer_key String

Customer key associated with the client sessionarrow-up-right.


device_count Number

Number of devices associated with the client sessionarrow-up-right.


expires_at Datetime

Date and time at which the client sessionarrow-up-right expires.


token String

Client session token associated with the client sessionarrow-up-right.


user_identifier_key String

Your user ID for the user associated with the client sessionarrow-up-right.


user_identity_id UUID

ID of the user identityarrow-up-right associated with the client session.


user_identity_ids List of UUIDs

IDs of the user identitiesarrow-up-right associated with the client session.

circle-exclamation

workspace_id UUID

ID of the workspacearrow-up-right associated with the client sessionarrow-up-right.


Events

client_session.deleted

A client sessionarrow-up-right was deleted.

chevron-rightPropertieshashtag

client_session_id UUID

ID of the affected client session.

created_at Datetime

Date and time at which the event was created.

event_id UUID

ID of the event.

event_type Enum

Value: client_session.deleted

occurred_at Datetime

Date and time at which the event occurred.

workspace_id UUID

ID of the workspacearrow-up-right associated with the event.


Endpoints

/client_sessions/create

Creates a new client sessionarrow-up-right.

/client_sessions/delete

Deletes a client sessionarrow-up-right.

/client_sessions/get

Returns a specified client sessionarrow-up-right.

/client_sessions/get_or_create

Returns a client sessionarrow-up-right with specific characteristics or creates a new client session with these characteristics if it does not yet exist.

/client_sessions/grant_access

Grants a client sessionarrow-up-right access to one or more resources, such as Connect Webviewsarrow-up-right, user identitiesarrow-up-right, and so on.

/client_sessions/list

Returns a list of all client sessionsarrow-up-right.

/client_sessions/revoke

Revokes a client sessionarrow-up-right.

Last updated

Was this helpful?