Client Sessions
The client_session Object
Represents a client session. 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 React.
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 session.
connect_webview_ids
List of UUIDs
IDs of the Connect Webviews associated with the client session.
connected_account_ids
List of UUIDs
IDs of the connected accounts associated with the client session.
created_at
Datetime
Date and time at which the client session was created.
customer_id
UUID
Customer ID associated with the client session.
device_count
Number
Number of devices associated with the client session.
expires_at
Datetime
Date and time at which the client session expires.
token
String
Client session token associated with the client session.
user_identifier_key
String
Your user ID for the user associated with the client session.
user_identity_id
UUID
ID of the user identity associated with the client session.
user_identity_ids
List of UUIDs
IDs of the user identities associated with the client session.
Deprecated. Use user_identity_id
instead.
workspace_id
UUID
ID of the workspace associated with the client session.
Events
client_session.deleted
A client session was deleted.
Endpoints
Creates a new client session.
Deletes a client session.
Returns a specified client session.
/client_sessions/get_or_create
Returns a client session with specific characteristics or creates a new client session with these characteristics if it does not yet exist.
Grants a client session access to one or more resources, such as Connect Webviews, user identities, and so on.
Returns a list of all client sessions.
Revokes a client session.
Last updated
Was this helpful?