Client Sessions

A client session produces a token that enables you to restrict a user's access to only the devices that they own.

If you want to restrict your users' access to their own devices, use client sessions.

The client_session object represents a client session.

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.

For more information about client sessions and client session tokens, see the following topics:

client_session Properties

The client_session object has the following properties:

PropertyTypeDescription

client_session_id

String Required

ID of the client session

user_identifier_key

String Required

Your own internal user ID for the user

created_at

String Required

Date and time at which the client session was created

token

String Required

Token that enables you to call Seam components while restricting a user's access to only devices that they own

device_count

Number Required

Number of devices to which this client session grants access

connected_account_ids

Array of strings Required

Array of IDs of the connected accounts associated with this client session

connect_webview_ids

Array of strings Required

IDs of the Connect Webviews associated with this client session

workspace_id

String Required

ID of the workspace associated with this client session

client_session Methods

You can perform the following actions on client_session objects:

Last updated

Logo

© Seam Labs, Inc. All rights reserved.