List Client Sessions

Get all client sessions

Returns a list of all client sessions.

/client_sessions/list

POSThttps://connect.getseam.com/client_sessions/list
Authorization
Body
client_session_idstring
user_identifier_keystring
connect_webview_idstring
without_user_identifier_keyboolean
user_identity_idstring
Response

OK

Body
client_sessions*array of client_session (object)
ok*boolean
Request
const response = await fetch('https://connect.getseam.com/client_sessions/list', {
    method: 'POST',
    headers: {
      "Authorization": "Bearer API Key",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "client_sessions": [
    {
      "client_session_id": "123e4567-e89b-12d3-a456-426614174000",
      "workspace_id": "123e4567-e89b-12d3-a456-426614174000",
      "created_at": "2024-09-16T19:25:55.562Z",
      "token": "text",
      "user_identifier_key": "text",
      "device_count": 0,
      "connected_account_ids": [
        "123e4567-e89b-12d3-a456-426614174000"
      ],
      "connect_webview_ids": [
        "123e4567-e89b-12d3-a456-426614174000"
      ],
      "user_identity_ids": [
        "123e4567-e89b-12d3-a456-426614174000"
      ]
    }
  ],
  "ok": false
}

Request

List all client sessions or filter the list of client sessions by including the corresponding filter parameters in the request body.

Request Body Parameters

ParameterTypeDescription

client_session_id

String Optional

ID of the client session that you want to retrieve

user_identifier_key

String Optional

Your own internal user ID for the user by which to filter client sessions

connect_webview_id

String Optional

ID of the Connect Webview for which you want to retrieve client sessions

without_user_identifier_key

Boolean Optional

Indicates whether to retrieve only client sessions without associated user identifier keys

Sample Request

await seam.clientSessions.list()

Response

Returns a client_sessions array, in which each returned client session (client_session) contains the following properties:

PropertyDescription

workspace_id

ID of the workspace that contains the client session

token

Client session token associated with the client session

user_identifier_key

Your own internal user ID for the user

created_at

Date and time at which the client session was created

client_session_id

ID of the client session

user_identity_ids

Array of user identity IDs on behalf of which which the client session may act

connect_webview_ids

Array of Connect Webview IDs associated with the client session

device_count

Number of devices to which the client session grants access

connected_account_ids

Array of connected account IDs associated with this client session

This response also includes a Boolean ok status indicator.

Sample Response

[
  {
    workspace_id: '398d80b7-3f96-47c2-b85a-6f8ba21d07be',
    token: 'seam_cst1271Q3JUh_A3ECdSrrqgYp98SmB9qY2NGp',
    user_identifier_key: 'internal user ID 1',
    created_at: '2023-12-26T04:23:46.829Z',
    client_session_id: 'c75d4330-ae01-4dfd-b6c5-f3e94e0d8168',
    user_identity_ids: [],
    connect_webview_ids: [],
    device_count: 4,
    connected_account_ids: [
      '3ea0b67f-649f-4131-bfe3-f2035e77a3f9',
      '6e1cad57-b244-40ca-b4f3-30a46c8000d4'
    ]
  },
  {
    workspace_id: '398d80b7-3f96-47c2-b85a-6f8ba21d07be',
    token: 'seam_cst1891oqCmE_6dBwV8PJ2Ffoe9dWYVyMfVHq',
    user_identifier_key: 'internal user ID 2',
    created_at: '2023-12-26T04:25:50.041Z',
    client_session_id: 'e1006128-19a8-4e4d-9a91-536d80cf9c21',
    user_identity_ids: [],
    connect_webview_ids: [],
    device_count: 4,
    connected_account_ids: [
      '2e884e71-b2c1-41a0-bb2c-ec94a7b4c6a4',
      'b0ccf472-cb63-400c-bf21-5b809f5e1afd'
    ]
  },
  ...
]

Last updated

Logo

© Seam Labs, Inc. All rights reserved.