Create a Client Session

Create a new client session

Creates a new client session.

Request

Specify the user ID and, optionally, connected accounts associated with the user by including the corresponding parameters in the request body.

Request Body Parameters

ParameterTypeDescription

user_identifier_key

String Required

Your own internal user ID for the user

connected_account_ids

Array of strings Optional

Array of IDs of the connected accounts associated with this user

Sample Request

await seam.clientSessions.create({
  user_identifier_key: "internal-user-id-1",
  connected_account_ids: [
    "3ea0b67f-649f-4131-bfe3-f2035e77a3f9",
    "6e1cad57-b244-40ca-b4f3-30a46c8000d4",
  ]
})

Response

Returns a client_session containing the following properties:

PropertyDescription

token

Client session token associated with the client session

workspace_id

ID of the workspace that contains the client session

user_identifier_key

Your own internal user ID for the user

client_session_id

ID of the client session

created_at

Date and time at which the client session was created

This response also includes a Boolean ok status indicator.

Sample Response

{
  token: 'seam_cst12GGG4LUp_AoHvcSx39aY4AoHQ7GdMDRTH',
  workspace_id: '398d80b7-3f96-47c2-b85a-6f8ba21d07be',
  user_identifier_key: 'internal user ID 1',
  client_session_id: '911b4a3f-e566-44a9-a8ac-267d9e586754',
  created_at: '2023-12-26T05:11:55.048Z'
}

Last updated

Logo

© Seam Labs, Inc. All rights reserved.