Skip to main content

Connection URLs and Endpoints

This page explains how to authenticate with your API token when connecting to BrowserQL. Follow these steps to build the correct connection URL for your BQL automation.

  1. Get Your API Token

  2. Add Token to URL

    Add your API token to the URL query string as ?token=YOUR_TOKEN. This is required for authentication and invalid tokens will result in HTTP 401/403 errors.

    Example:

    https://production-sfo.browserless.io/chromium/bql?token=094632bb-e326-4c63-b953-82b55700b14c

    Security Note: Keep this URL secure and never expose it in client-side code or logs.

  3. Build Your Connection URL

    Use the interactive builder below to select your preferences for region and browser:

    BQL Connection URL Builder

    Connection URL:

    https://production-sfo.browserless.io/chromium/bql?token=YOUR_TOKEN

    Code Snippet:

    const response = await fetch('https://production-sfo.browserless.io/chromium/bql?token=YOUR_TOKEN', {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        query: `mutation MyQuery($url: String!) {
          goto(url: $url) {
            status
          }
          # Add more BQL operations here
        }`,
        variables: { url: 'https://example.com' }
      }),
    });