---
search:
  tags:
    - browser
    - GET
seo:
  description: >-
    A WebSocket upgrade. Once connected, this is Chrome's browser-level…
    Reference for the GET /v1/sandboxes/{sandbox}/browser/cdp endpoint in the
    pols.so API.
sidebar:
  label: Connect to the sandbox's Chrome DevTools Protocol endpoint (WebSocket)
  badge: GET
title: Connect to the sandbox's Chrome DevTools Protocol endpoint (WebSocket)
type: openapi-operation
---
A WebSocket upgrade. Once connected, this is Chrome's browser-level
CDP endpoint (`/devtools/browser/<id>`): messages are relayed
unchanged in both directions. Chrome is started on the sandbox's
desktop if it is not running yet, so the browser is also visible in
screenshots and can be driven with `/computer/actions`.

Authenticate with the API key (`Authorization: Bearer pols_...`, for
example Playwright's `connectOverCDP(url, { headers })`), or with the
`token` query parameter of a URL from `POST
/v1/sandboxes/{sandbox}/browser/cdp`. Errors before the upgrade are
returned as JSON.

`GET /v1/sandboxes/{sandbox}/browser/cdp`
