Skip to main content

Using Relay

Relay lets you use your real Chrome browser as a session backend. The Browsr Chrome Extension bridges your authenticated tabs to the API via WebSocket -- automate pages you're already logged into without sharing credentials.

Setup

  1. Install the Browsr Chrome Extension from the Chrome Web Store
  2. Click the extension icon and sign in with your Browsr account
  3. Click "Start Relay" in the extension popup
  4. Your Chrome tab appears as a relay session in the API

Create a relay session

curl -X POST https://api.browsr.dev/relay/sessions \
-H "Authorization: Bearer $BROWSR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"tab_url": "https://example.com", "tab_title": "My Tab"}'

List relay sessions

curl https://api.browsr.dev/relay/sessions \
-H "Authorization: Bearer $BROWSR_API_KEY"

Send CDP commands to a relay session

Send Chrome DevTools Protocol commands directly to your relayed browser tab:

curl -X POST https://api.browsr.dev/relay/sessions/SESSION_ID/cdp \
-H "Authorization: Bearer $BROWSR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"method": "Page.navigate", "params": {"url": "https://example.com"}}'

Delete a relay session

curl -X DELETE https://api.browsr.dev/relay/sessions/SESSION_ID \
-H "Authorization: Bearer $BROWSR_API_KEY"