> ## Documentation Index
> Fetch the complete documentation index at: https://docs.seam.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a Client Session

> Returns a specified [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens).



## OpenAPI

````yaml /openapi.json post /client_sessions/get
openapi: 3.0.0
info:
  title: Seam Connect
  version: 1.0.0
servers:
  - url: https://connect.getseam.com
security: []
tags:
  - description: access_codes
    name: /access_codes
  - description: acs
    name: /acs
  - description: action_attempts
    name: /action_attempts
  - description: client_sessions
    name: /client_sessions
  - description: connected_accounts
    name: /connected_accounts
  - description: connect_webviews
    name: /connect_webviews
  - description: devices
    name: /devices
  - description: events
    name: /events
  - description: health
    name: /health
  - description: locks
    name: /locks
  - description: networks
    name: /networks
  - description: noise_sensors
    name: /noise_sensors
  - description: phones
    name: /phones
  - description: thermostats
    name: /thermostats
  - description: user_identities
    name: /user_identities
  - description: webhooks
    name: /webhooks
  - description: workspaces
    name: /workspaces
paths:
  /client_sessions/get:
    post:
      tags:
        - /client_sessions
      summary: Get a Client Session
      description: >-
        Returns a specified [client
        session](https://docs.seam.co/core-concepts/authentication/client-session-tokens).
      operationId: clientSessionsGetPost
      requestBody:
        content:
          application/json:
            schema:
              properties:
                client_session_id:
                  description: ID of the client session that you want to get.
                  format: uuid
                  type: string
                user_identifier_key:
                  description: >-
                    User identifier key associated with the client session that
                    you want to get.
                  type: string
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  client_session:
                    $ref: '#/components/schemas/client_session'
                  ok:
                    type: boolean
                required:
                  - client_session
                  - ok
                type: object
          description: OK
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
      security:
        - client_session: []
        - pat_with_workspace: []
        - console_session_with_workspace: []
        - api_key: []
      x-codeSamples:
        - lang: javascript
          label: Seam SDK
          source: |-
            await seam.clientSessions.get({
              client_session_id: "c2cbd177-1ace-414b-bb1e-9f129e4a05c1",
            });

            /*
            {
              "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"
            }
            */
        - lang: bash
          label: cURL
          source: >-
            curl --include --request POST
            "https://connect.getseam.com/client_sessions/get" \
              --header "Authorization: Bearer $SEAM_API_KEY" \
              --json @- <<EOF
            {
              "client_session_id": "c2cbd177-1ace-414b-bb1e-9f129e4a05c1"
            }

            EOF


            # Response:

            # {

            #   "client_session": {

            #     "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"

            #   }

            # }
        - lang: python
          label: Seam SDK
          source: >-
            seam.client_sessions.get(client_session_id="c2cbd177-1ace-414b-bb1e-9f129e4a05c1")


            # ClientSession(
                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",
            )
        - lang: ruby
          label: Seam SDK
          source: >-
            seam.client_sessions.get(client_session_id:
            "c2cbd177-1ace-414b-bb1e-9f129e4a05c1")


            # => {
              "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",
            }
        - lang: php
          label: Seam SDK
          source: |-
            $seam->client_sessions->get(
                client_session_id: "c2cbd177-1ace-414b-bb1e-9f129e4a05c1",
            );

            // [
                "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",
            ];
        - lang: bash
          label: Seam CLI
          source: >-
            seam client-sessions get --client_session_id
            "c2cbd177-1ace-414b-bb1e-9f129e4a05c1"


            # {

            #   "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"

            # }
components:
  schemas:
    client_session:
      description: >-
        Represents a [client
        session](https://docs.seam.co/core-concepts/authentication/client-session-tokens).
        If you want to restrict your users' access to their own devices, use
        client sessions.
      properties:
        client_session_id:
          description: >-
            ID of the [client
            session](https://docs.seam.co/core-concepts/authentication/client-session-tokens).
          format: uuid
          type: string
        connect_webview_ids:
          description: >-
            IDs of the [Connect
            Webviews](https://docs.seam.co/core-concepts/connect-webviews)
            associated with the [client
            session](https://docs.seam.co/core-concepts/authentication/client-session-tokens).
          items:
            format: uuid
            type: string
          type: array
        connected_account_ids:
          description: >-
            IDs of the [connected
            accounts](https://docs.seam.co/core-concepts/connected-accounts)
            associated with the [client
            session](https://docs.seam.co/core-concepts/authentication/client-session-tokens).
          items:
            format: uuid
            type: string
          type: array
        created_at:
          description: >-
            Date and time at which the [client
            session](https://docs.seam.co/core-concepts/authentication/client-session-tokens)
            was created.
          format: date-time
          type: string
        customer_key:
          description: >-
            Customer key associated with the [client
            session](https://docs.seam.co/core-concepts/authentication/client-session-tokens).
          type: string
        device_count:
          description: >-
            Number of devices associated with the [client
            session](https://docs.seam.co/core-concepts/authentication/client-session-tokens).
          format: float
          type: number
        expires_at:
          description: >-
            Date and time at which the [client
            session](https://docs.seam.co/core-concepts/authentication/client-session-tokens)
            expires.
          format: date-time
          type: string
        token:
          description: >-
            Client session token associated with the [client
            session](https://docs.seam.co/core-concepts/authentication/client-session-tokens).
          type: string
        user_identifier_key:
          description: >-
            Your user ID for the user associated with the [client
            session](https://docs.seam.co/core-concepts/authentication/client-session-tokens).
          nullable: true
          type: string
        user_identity_id:
          description: >-
            ID of the [user
            identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity)
            associated with the client session.
          format: uuid
          type: string
        user_identity_ids:
          deprecated: true
          description: >-
            IDs of the [user
            identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity)
            associated with the client session.
          items:
            format: uuid
            type: string
          type: array
          x-deprecated: Use `user_identity_id` instead.
        workspace_id:
          description: >-
            ID of the [workspace](https://docs.seam.co/core-concepts/workspaces)
            associated with the [client
            session](https://docs.seam.co/core-concepts/authentication/client-session-tokens).
          format: uuid
          type: string
      required:
        - client_session_id
        - workspace_id
        - created_at
        - expires_at
        - token
        - user_identifier_key
        - device_count
        - connected_account_ids
        - connect_webview_ids
        - user_identity_ids
      type: object
      x-route-path: /client_sessions
  securitySchemes:
    client_session:
      bearerFormat: Client Session Token
      scheme: bearer
      type: http
    pat_with_workspace:
      bearerFormat: API Token
      scheme: bearer
      type: http
    console_session_with_workspace:
      bearerFormat: Console Session Token
      scheme: bearer
      type: http
    api_key:
      bearerFormat: API Key
      scheme: bearer
      type: http

````