await seam.clientSessions.create({
customer_id: "e387e15f-be27-47ad-881f-4a6fc5460c57",
customer_key: "My Company",
user_identifier_key: "jane_doe",
connect_webview_ids: ["dafe6400-7484-4fd1-8c17-1c901b444250"],
connected_account_ids: ["8062d457-e28e-481f-aecc-509905627511"],
user_identity_id: "89765fd3-6193-4d63-8605-e77f75356555",
expires_at: "2025-06-19T15:22:40.000Z",
});
/*
{
"client_session_id": "c2cbd177-1ace-414b-bb1e-9f129e4a05c1",
"connect_webview_ids": [
"dafe6400-7484-4fd1-8c17-1c901b444250"
],
"connected_account_ids": [
"8062d457-e28e-481f-aecc-509905627511"
],
"created_at": "2025-06-15T16:54:17.946309Z",
"customer_id": "e387e15f-be27-47ad-881f-4a6fc5460c57",
"device_count": 1,
"expires_at": "2025-06-19T15:22:40.000Z",
"token": "seam_cst1891oqCmD_6dBwV8PJ2Fsoe9dWYVyMfVHq",
"user_identifier_key": "jane_doe",
"user_identity_id": "89765fd3-6193-4d63-8605-e77f75356555",
"workspace_id": "b887bf84-9849-4454-a562-cf84293d9781"
}
*/{
"client_session": {
"client_session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"connect_webview_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"connected_account_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"created_at": "2023-11-07T05:31:56Z",
"device_count": 123,
"expires_at": "2023-11-07T05:31:56Z",
"token": "<string>",
"user_identifier_key": "<string>",
"user_identity_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_key": "<string>",
"user_identity_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}Create a Client Session
Creates a new client session. Reference for PUT /client_sessions/create in the Seam API, with request and response details.
await seam.clientSessions.create({
customer_id: "e387e15f-be27-47ad-881f-4a6fc5460c57",
customer_key: "My Company",
user_identifier_key: "jane_doe",
connect_webview_ids: ["dafe6400-7484-4fd1-8c17-1c901b444250"],
connected_account_ids: ["8062d457-e28e-481f-aecc-509905627511"],
user_identity_id: "89765fd3-6193-4d63-8605-e77f75356555",
expires_at: "2025-06-19T15:22:40.000Z",
});
/*
{
"client_session_id": "c2cbd177-1ace-414b-bb1e-9f129e4a05c1",
"connect_webview_ids": [
"dafe6400-7484-4fd1-8c17-1c901b444250"
],
"connected_account_ids": [
"8062d457-e28e-481f-aecc-509905627511"
],
"created_at": "2025-06-15T16:54:17.946309Z",
"customer_id": "e387e15f-be27-47ad-881f-4a6fc5460c57",
"device_count": 1,
"expires_at": "2025-06-19T15:22:40.000Z",
"token": "seam_cst1891oqCmD_6dBwV8PJ2Fsoe9dWYVyMfVHq",
"user_identifier_key": "jane_doe",
"user_identity_id": "89765fd3-6193-4d63-8605-e77f75356555",
"workspace_id": "b887bf84-9849-4454-a562-cf84293d9781"
}
*/{
"client_session": {
"client_session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"connect_webview_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"connected_account_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"created_at": "2023-11-07T05:31:56Z",
"device_count": 123,
"expires_at": "2023-11-07T05:31:56Z",
"token": "<string>",
"user_identifier_key": "<string>",
"user_identity_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_key": "<string>",
"user_identity_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}Authorizations
Body
IDs of the Connect Webviews for which you want to create a client session.
IDs of the connected accounts for which you want to create a client session.
Customer ID that you want to associate with the new client session.
Customer key that you want to associate with the new client session.
1Your user ID for the user for whom you want to create a client session. When you authenticate with a publishable key, the user_identifier_key must be a high-entropy secret that only the user knows, such as a UUIDv4 or a salted hash. Do not use an email address, name, phone number, or other guessable value, because anyone who knows the user_identifier_key can retrieve the client session.
1ID of the user identity for which you want to create a client session.
Deprecated. Use user_identity_id instead.
IDs of the user identities that you want to associate with the client session.
1 elementResponse
OK
Represents a client session. If you want to restrict your users' access to their own devices, use client sessions. See the client_session object.
Show child attributes
Show child attributes
Was this page helpful?