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

# Get live-view connection

> Fetches a fresh live-view connection for watching an active session's browser stream: a viewer URL plus its auth token.

The auth token is **single-use** — once a viewer link has been opened, opening it again (reloading the tab, or reopening it later) fails to connect. Call this endpoint again to mint a fresh token/link rather than reusing an old one.

Only works while the session is still active; fails once the session has ended.



## OpenAPI

````yaml run-api/run-api.yaml get /live/sessions/{session_id}/connection
openapi: 3.1.0
info:
  title: CloudCruise Run API
  version: 0.1.0
  description: >-
    Endpoints for managing workflow executions, user interactions, and
    retrieving execution results.
servers:
  - url: https://api.cloudcruise.com
    description: CloudCruise Platform Production API Server
security:
  - AuthScheme: []
paths:
  /live/sessions/{session_id}/connection:
    get:
      summary: Get live-view connection
      description: >-
        Fetches a fresh live-view connection for watching an active session's
        browser stream: a viewer URL plus its auth token.


        The auth token is **single-use** — once a viewer link has been opened,
        opening it again (reloading the tab, or reopening it later) fails to
        connect. Call this endpoint again to mint a fresh token/link rather than
        reusing an old one.


        Only works while the session is still active; fails once the session has
        ended.
      operationId: get_live_view_connection
      parameters:
        - name: session_id
          in: path
          required: true
          schema:
            type: string
            description: The unique identifier for the workflow execution session
      responses:
        '200':
          description: Live-view connection successfully retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LiveViewConnection'
        '400':
          description: Session not found, or not currently active
components:
  schemas:
    LiveViewConnection:
      type: object
      description: >-
        A viewer URL and its single-use auth token for watching an active
        session's browser stream. Note the field names are camelCase, unlike
        other Run API responses.
      properties:
        url:
          type: string
          format: uri
          example: >-
            https://live-view.cloudcruise.com/viewer?authToken=eyJhbGciOi...#e5f6a7b8-9abc-4def-0123-56789abcdef0
          description: The viewer URL, with the single-use auth token embedded.
        sessionId:
          type: string
          example: e5f6a7b8-9abc-4def-0123-56789abcdef0
          description: Unique identifier for the workflow execution session
        authToken:
          type: string
          example: eyJhbGciOi...
          description: >-
            Single-use auth token embedded in `url`. Consuming the viewer link
            invalidates it — call this endpoint again for a fresh one.
      required:
        - url
        - sessionId
        - authToken
  securitySchemes:
    AuthScheme:
      type: apiKey
      name: cc-key
      in: header
      description: >-
        API key-based authentication. Provide your CloudCruise API key in the
        cc-key header.

````