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

# Tg Auto Start

> Kick off the QR-scan + scripted-CDP Telegram bot creation flow.

Idempotent: if a non-terminal QR session already exists for this box,
returns it instead of spawning another browser. The FE keeps polling
`GET /me/tg/auto/{id}` until the session reaches a terminal state.

No external BU Cloud API key is needed — the orchestrator provisions
the chromium VM via the cloud's internal browser service, which auths
via app_config.use_browser_api_key (already set in every env).



## OpenAPI

````yaml /cloud/openapi/v3.json post /boxes/me/tg/auto
openapi: 3.1.0
info:
  title: Browser Use Public API v3
  summary: Browser Use session-based agent API (v3)
  version: 3.0.0
servers:
  - url: https://api.browser-use.com/api/v3
    description: Production server
security: []
paths:
  /boxes/me/tg/auto:
    post:
      tags:
        - Boxes
      summary: Tg Auto Start
      description: |-
        Kick off the QR-scan + scripted-CDP Telegram bot creation flow.

        Idempotent: if a non-terminal QR session already exists for this box,
        returns it instead of spawning another browser. The FE keeps polling
        `GET /me/tg/auto/{id}` until the session reaches a terminal state.

        No external BU Cloud API key is needed — the orchestrator provisions
        the chromium VM via the cloud's internal browser service, which auths
        via app_config.use_browser_api_key (already set in every env).
      operationId: tg_auto_start_boxes_me_tg_auto_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TgAutoStartResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    TgAutoStartResponse:
      properties:
        session:
          $ref: '#/components/schemas/TgAutoSessionView'
      type: object
      required:
        - session
      title: TgAutoStartResponse
      description: |-
        Returned by POST /me/tg/auto. The session is already running by the
        time this returns — frontend opens the iframe and starts polling.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TgAutoSessionView:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        state:
          type: string
          enum:
            - pending_browser
            - waiting_scan
            - login_detected
            - minting
            - installing
            - installed
            - failed
            - expired
          title: State
        live_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Live Url
        bot_username:
          anyOf:
            - type: string
            - type: 'null'
          title: Bot Username
        error_code:
          anyOf:
            - type: string
              enum:
                - bu_cloud_auth
                - bu_cloud_unavailable
                - bu_cloud_rate_limited
                - bu_cloud_timeout
                - scan_timeout
                - agent_dispatch_failed
                - agent_timeout
                - agent_no_output
                - agent_failed
                - invalid_token
                - bot_username_collision
                - rate_limited_botfather
                - box_not_ready
                - tg_already_installed
                - install_telegram_failed
                - box_offline
                - cancelled
                - concurrent_limit
                - internal
            - type: 'null'
          title: Error Code
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - id
        - state
        - live_url
        - bot_username
        - error_code
        - error_message
        - created_at
        - updated_at
      title: TgAutoSessionView
      description: |-
        Snapshot of a QR onboarding session. Returned by start, status, and
        cancel — same shape so the FE renders a single view component.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-Browser-Use-API-Key

````