Get a Client Session

Get a specified client session

Returns a specified client session.

/client_sessions/get

POSThttps://connect.getseam.com/client_sessions/get
Authorization
Body
client_session_idstring
user_identifier_keystring
Response

OK

Body
client_session*client_session (object)
ok*boolean
Request
const response = await fetch('https://connect.getseam.com/client_sessions/get', {
    method: 'POST',
    headers: {
      "Authorization": "Bearer Client Session Token",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "client_session": {
    "client_session_id": "123e4567-e89b-12d3-a456-426614174000",
    "user_identifier_key": "text",
    "created_at": "2024-04-27T09:28:02.316Z",
    "token": "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"
    ],
    "workspace_id": "123e4567-e89b-12d3-a456-426614174000"
  },
  "ok": false
}

Request

Specify the desired client session by including the corresponding client_session_id in the request body.

Sample Request

const clientSession = await seam.clientSessions.get({
  client_session_id: "c75d4330-ae01-4dfd-b6c5-f3e94e0d8168",
})

Request Body Parameters

ParameterTypeDescription

client_session_id

String Required

ID of the desired client session

Response

Returns a client_session containing 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

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

connect_webview_ids

Array of Connect Webview IDs associated with the client session

user_identity_ids

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

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',
  device_count: 4,
  connected_account_ids: [
    '3ea0b67f-649f-4131-bfe3-f2035e77a3f9',
    '6e1cad57-b244-40ca-b4f3-30a46c8000d4'
  ],
  connect_webview_ids: [],
  user_identity_ids: []
}

Last updated

Logo

© Seam Labs, Inc. All rights reserved.