Connect over CDP
Opens a WebSocket that speaks the Chrome DevTools Protocol for this session only, so Playwright (`chromium.connectOverCDP`), Puppeteer (`puppeteer.connect`) or any CDP client can drive the browser. The proxy exposes only the session's own targets. It refuses `SystemInfo.*`, `Tethering.*`, `Extensions.*`, `Cast.*`, and `Browser.*` except the methods Playwright and Puppeteer need to drive a browser (`getVersion`, the permission methods, window bounds, `setDownloadBehavior` and `cancelDownload`); host file access (`DOM.setFileInputFiles`, file drags); downloads to host paths (they land in the session's own directory, wiped with the browser); and navigation to anything but `http:`, `https:` and `about:blank` (`file:`, `chrome:`, `chrome-extension:`, `view-source:`, `devtools:`, `data:`). These answer `cdp_method_blocked` in the CDP error (`error.data.code`). `Target.createBrowserContext` with `proxyServer`, `proxyBypassList` or `originsWithUniversalNetworkAccess` answers `forbidden` (403): every context of a session uses the session's egress. Authenticate with the `Authorization` header or a ticket from `POST /v1/vision/sessions/{session_id}/ticket`. A client that falls more than a few MB behind is disconnected, and so is one that sends a message over 32 MiB. A message with a repeated member (two `method`s, say) answers the JSON-RPC parse error `-32700`.
/v1/vision/sessions/{session_id}/cdp
Authentication
Path Parameters
session_id
string
required
path
"brs_01m5t3y30wcksxf22t9gwk9fwb"Query Parameters
ticket
string
optional
query
Responses
No response body
curl -X GET 'https://beta-api.b3os.org/v1/vision/sessions/brs_01m5t3y30wcksxf22t9gwk9fwb/cdp' \ -H 'Authorization: Bearer YOUR_API_TOKEN'
const response = await fetch('https://beta-api.b3os.org/v1/vision/sessions/brs_01m5t3y30wcksxf22t9gwk9fwb/cdp', { method: 'GET', headers: { "Authorization": "Bearer YOUR_API_TOKEN" }});const data = await response.json();console.log(data);
import requestsheaders = { 'Authorization': 'Bearer YOUR_API_TOKEN'}response = requests.get('https://beta-api.b3os.org/v1/vision/sessions/brs_01m5t3y30wcksxf22t9gwk9fwb/cdp', headers=headers)print(response.json())
{ "type": "https://docs.beta.b3os.org/errors#invalid_request", "title": "Invalid request", "status": 400, "code": "invalid_request", "detail": "1 field failed validation", "instance": "req_01m5t4yg394wegr3j4y01qb363", "errors": [ { "pointer": "/url", "detail": "must be an absolute http or https URL" } ]}
Try this endpoint
/v1/vision/sessions/{session_id}/cdp