Testerly Browser API

Contract version

Version: 1.13.0 Updated: 2026-10-26

This file is the API contract. The public copy at https://testerly.net/docs is rendered from this file. When the contract changes, increase the version and add a changelog entry in the same edit. Describe only behavior the API implements.

Changelog

1.13.0 — 2026-10-26

  • Clicks and key presses hold the button or key down for a varying, human-like time instead of releasing it at once. hold_ms sets an exact time.
  • type_keys types at an uneven, human-like rhythm around delay_ms, which is now 110 milliseconds when omitted.
  • click_count sends a double or triple click.

1.12.0 — 2026-10-26

  • proxyCountry chooses the country of the service proxy when useLocalProxy is true, by name (Germany) or two-letter code (DE). Germany is used when it is omitted.
  • Responses that describe a session include proxy_country.
  • GET /v1/browser/proxy-status includes proxy_list: the countries available and how many proxies in each are working.

1.11.0 — 2026-10-22

  • show_cursor on POST /v1/browser/screen_share draws a mouse pointer on the presented tab.
  • move accepts duration_ms and path, and the new type_keys action types with real key presses, delay_ms apart.

1.10.0 — 2026-10-21

  • Camera image for accounts that have it enabled: /v1/browser/camera shows a still or animated image (PNG, JPEG, GIF, or WebP) as the session camera. Video is not accepted.
  • MCP adds browser_camera.

1.9.1 — 2026-10-21

  • Fingerprint canvas noise now changes only pixels at the edges of drawn content; flat areas read back exactly. Sites that verify canvas readback, including Google Meet, no longer reject fingerprinted sessions. A reused fingerprint.seed keeps producing one stable canvas signature, but it differs from the signature that seed produced before this version.

1.9.0 — 2026-10-21

  • Live media for accounts that have it enabled: media.audio gives a session a private speaker and microphone, streamed as raw PCM over wss://testerly.net/v1/browser/media, with microphone and camera permissions granted automatically.
  • media.screen_share and /v1/browser/screen_share choose the tab a page such as Google Meet presents.
  • MCP adds browser_screen_share and browser_media_stream, and the media option when opening a session.

1.8.0 — 2026-10-18

  • Authorized accounts can connect Claude and other MCP clients to https://testerly.net/mcp. The MCP tools perform the same operations as /v1/browser/* under the same account permissions.
  • claude.ai custom connectors sign in with OAuth 2.1: dynamic client registration, PKCE, and a consent page on the customer account.

1.7.0 — 2026-10-16

  • Clients can list, open, activate, and close browser tabs with GET|POST|DELETE /v1/browser/tabs.
  • A popup or link that opens a new tab automatically becomes the active page used by actions, observations, screenshots, and the live viewer.

1.6.0 — 2026-10-16

  • Authorized accounts can inspect and manage cookies, local and session storage, IndexedDB, Cache Storage, and service-worker registrations.
  • Storage state can be exported and imported, including HttpOnly cookies and JSON-compatible IndexedDB values.
  • The insert_text action inserts complete text and pasted values efficiently.

1.5.0 — 2026-10-15

  • Fingerprint values now apply inside dedicated, shared, and service workers before worker code starts.
  • Each operating-system profile exposes a matching allowlist of redistributable fonts and metric-compatible substitutes.
  • Canvas, WebGL readback, and Web Audio output receive small, stable noise derived from fingerprint.seed. Omit the seed to create a random device, or reuse it across sessions to reproduce one.

1.4.0 — 2026-10-15

  • fingerprint sets the device the browser presents: operating system, screen, window, pixel ratio, touch, user agent, GPU, CPU cores, and memory. It must be enabled on the account. Otherwise it returns 403.
  • Responses that describe a session include fingerprint, or null when the session presents the service's own device.

1.3.0 — 2026-10-15

  • timezoneId and locale set the browser's timezone and language on the request that creates a session.
  • When either is omitted, it is taken from the location of the IP address sites see: the proxy's exit, or the service's own address without a proxy.
  • Responses that describe a session include timezone_id, locale, timezone_source, locale_source, and ip_country.

1.2.0 — 2026-10-15

  • An account can be refused its own proxy. proxyServer then returns 403.
  • An account can be refused the service proxy. useLocalProxy: true then returns 403.
  • How long an idle session stays open is set on the account. An account can be set so idle time does not close its sessions.

1.1.0 — 2026-10-15

  • useLocalProxy selects the service proxy on the request that creates a session.
  • proxyServer accepts http, https, or socks5. A client proxy replaces the service proxy for that session, including when useLocalProxy is also true.
  • proxyUsername and proxyPassword authenticate that proxy. They are not stored.
  • A successful response includes proxy_mode: direct, local, or customer.
  • use_proxy is still accepted only when useLocalProxy is omitted. Send useLocalProxy.

1.0.0

Initial public contract: health, navigate, observe, snapshot, action, screenshot, html, console, network, clear capture, extract document text, list sessions, close session, and proxy status. A request returns 409 when an administrator is controlling that session, and the request is not applied.

Base URL

https://testerly.net

Authentication

Every /v1/browser/* request requires:

Authorization: Bearer tly_your_api_key
Accept: application/json

Requests with a JSON body also require:

Content-Type: application/json

Each customer and session_id has isolated browser state. Reuse a session_id to preserve the page, cookies, cache, and preferences between calls.

How many sessions an account can hold open, and how long an idle session stays open, are set on the account. After the last API request, an idle session is closed and its stored browser state is deleted. An account can instead be set so idle time does not close its sessions. Opening one more session than the account allows returns 429. The service also returns 429 when every browser it will run is already open.

Service Health

GET /health

curl https://testerly.net/health

Navigate

POST /v1/browser/navigate

Opens a URL in a browser session.

{
  "url": "https://example.com",
  "session_id": "agent-1",
  "useLocalProxy": false
}
  • url — required HTTP or HTTPS URL.
  • session_id — optional; defaults to default. Reuse it to keep the same browser.
  • useLocalProxy — optional boolean. See Proxy.
  • proxyCountry — optional, with useLocalProxy: true. See Proxy.
  • timezoneId and locale — optional. See Timezone and locale.
  • fingerprint — optional; only for accounts where it is enabled. See Device fingerprint.
curl -X POST https://testerly.net/v1/browser/navigate \
  -H 'Authorization: Bearer tly_your_api_key' \
  -H 'Content-Type: application/json' \
  -d '{"url":"https://example.com","session_id":"agent-1","useLocalProxy":false}'

Proxy

Choose the proxy on the request that creates the session, normally POST /v1/browser/navigate. The browser keeps that choice until the session is closed. A later request does not switch it. To change proxy, close the session and open it again.

Send the proxy fields on POST /v1/browser/extract_doc_text as well when that call is what creates the session.

There are two choices. A direct connection is the default. An account can be refused its own proxy, the service proxy, or both. A refused choice returns 403 and does not open a browser.

Use the service proxy

Set useLocalProxy to true. Traffic uses a service proxy in the country you choose with proxyCountry, given by English name (Germany, United States) or two-letter code (DE, US). Without proxyCountry, the proxy is in Germany.

{
  "url": "https://example.com",
  "session_id": "agent-1",
  "useLocalProxy": true,
  "proxyCountry": "Austria"
}
curl -X POST https://testerly.net/v1/browser/navigate \
  -H 'Authorization: Bearer tly_your_api_key' \
  -H 'Content-Type: application/json' \
  -d '{"url":"https://example.com","session_id":"agent-1","useLocalProxy":true,"proxyCountry":"DE"}'

Each new session gets a proxy that passes a connection check when the session opens; proxies that fail are skipped. The response includes proxy_country. GET /v1/browser/proxy-status lists the countries available.

  • A country with no service proxies returns 422, with the countries that have them.
  • When no proxy in the country is working, the request returns 503. Try again shortly.
  • proxyCountry without useLocalProxy: true returns 422.

In every case the browser is not opened without a proxy.

Use your own proxy

Send proxyServer. This replaces the service proxy for that session, even if useLocalProxy is also true.

proxyServer is an http://host:port or socks5://host:port URL. https://host:port is also accepted for an HTTP proxy. The host must be public, and the port is required.

proxyUsername and proxyPassword are optional. For a SOCKS5 proxy that requires a login, send both. The username cannot contain : or #. The password cannot contain #.

Credentials are used for that session only. They are not stored.

{
  "url": "https://example.com",
  "session_id": "agent-1",
  "proxyServer": "socks5://proxy.example.com:1080",
  "proxyUsername": "proxy-user",
  "proxyPassword": "proxy-password"
}

HTTP proxy:

{
  "url": "https://example.com",
  "session_id": "agent-1",
  "proxyServer": "http://proxy.example.com:8080",
  "proxyUsername": "proxy-user",
  "proxyPassword": "proxy-password"
}
curl -X POST https://testerly.net/v1/browser/navigate \
  -H 'Authorization: Bearer tly_your_api_key' \
  -H 'Content-Type: application/json' \
  -d '{"url":"https://example.com","session_id":"agent-1","proxyServer":"socks5://proxy.example.com:1080","proxyUsername":"proxy-user","proxyPassword":"proxy-password"}'

A successful response includes proxy_mode: direct, local, or customer.

Timezone and locale

Sites compare the browser's timezone and language with the location of the IP address they see. Set both on the request that creates the session, like the proxy. A later request does not change them.

  • timezoneId — optional IANA time zone, such as Africa/Johannesburg or Europe/Berlin.
  • locale — optional language tag, such as en-ZA or de-DE. It sets the browser language and the Accept-Language header.

An invalid value returns 422 and does not open a browser.

When either value is omitted, the service looks up the location of the IP address sites will see and uses it. With a proxy, that is where the proxy exits, looked up through the proxy. This adds up to a few seconds when a proxied session opens. Without a proxy, it is the service's own address. If the location cannot be found, the session opens with the defaults below.

Value Sent on the request Location found Otherwise
Timezone The value sent The location's timezone UTC, or Europe/Berlin for a service proxy in Germany
Locale The value sent The main language of the location's country The main language of proxyCountry with a service proxy, otherwise en-US
{
  "url": "https://example.com",
  "session_id": "agent-1",
  "proxyServer": "socks5://proxy.example.com:1080",
  "proxyUsername": "proxy-user",
  "proxyPassword": "proxy-password",
  "timezoneId": "Africa/Johannesburg",
  "locale": "en-ZA"
}

A successful response includes:

  • timezone_id and locale — the values the browser uses.
  • timezone_source and locale_source — request, detected, or default.
  • ip_country — the two-letter country of the IP address sites see, or null when it was not looked up or not found.

Device fingerprint

By default the browser presents the service's own device: Linux, a 1280×1024 screen, and a 1200×757 page area. fingerprint presents a different device instead, so you can test how a site behaves on Windows, macOS, Linux, or an Android phone, at the screen and window size you need.

This option must be enabled on your account. It is off for every account until the operator has verified who you are and how you use the service. While it is off, a request that includes fingerprint returns 403 and does not open a browser. Ask the operator to enable it.

Send fingerprint on the request that creates the session, like the proxy. A later request does not change it. To use a different device, close the session and open it again.

{
  "url": "https://example.com",
  "session_id": "agent-1",
  "fingerprint": {
    "os": "windows",
    "screen": { "width": 1920, "height": 1080 },
    "viewport": { "width": 1920, "height": 947 }
  }
}

Every field is optional. Omitted fields take the values of the os profile, so the device stays consistent. Sending only "fingerprint": { "os": "macos" } presents a complete MacBook.

Field Values Default
os windows, macos, linux, or android windows
screen width and height, 320–7680 × 320–4320 From os
viewport Page area, width and height from 200 up to the screen size The screen less the taskbar and browser toolbar
deviceScaleFactor 0.5–4 From os
touch true or false true for android
userAgent Up to 512 printable ASCII characters Built from os and the Chrome version the service runs
gpu vendor (up to 200 characters) and renderer (up to 300) From os
hardwareConcurrency CPU cores, 1–128 From os
deviceMemory 0.25, 0.5, 1, 2, 4, 8, 16, or 32 From os
seed 1–128 printable ASCII characters A random 32-character value

Profiles:

os Screen Pixel ratio GPU Cores Memory
windows 1920×1080 1 NVIDIA GeForce RTX 3060 8 8
macos 1512×982 2 Apple M3 Pro 12 16
linux 1920×1080 1 Intel UHD Graphics 630 8 8
android 412×915 (Pixel 7) 2.625 Mali-G710 8 8

os also sets navigator.platform and the user-agent client hints (Sec-CH-UA-Platform and navigator.userAgentData). The browser remains real Google Chrome, and its brand list is not changed.

The same operating system, CPU, memory, platform, user agent, and seeded rendering behavior apply in web workers. No separate worker option is needed.

The container does not redistribute Microsoft or Apple font files. Windows, macOS, Linux, and Android profiles instead expose separate sets of open fonts such as Carlito, Caladea, Liberation, Nimbus, Roboto, and Noto. Common proprietary family names are mapped to metric-compatible substitutes. This matches ordinary layout closely, but a careful font fingerprint can still distinguish a substitute from the proprietary file.

Canvas, WebGL pixel reads, and Web Audio reads receive small deterministic changes. They are stable for the life of the session and across reloads. Send the same seed with the same profile values to reproduce them in another session. The noise makes sessions distinct; it does not make software rendering identical to a physical NVIDIA, Apple, or ARM GPU, and detection software may identify the modification itself.

To match the device's location, combine fingerprint with a proxy, timezoneId, and locale.

An invalid value returns 422 and does not open a browser.

A successful response includes fingerprint with the values the browser uses, or null when the session presents the service's own device.

Observe

GET /v1/browser/observe

Returns the current URL, title, visible text, scroll state, actionable elements, and recent diagnostics. Element ref values can be used with POST /v1/browser/action.

Query parameters:

  • session_id — optional; defaults to default.
  • limit — optional actionable-element limit; default 80, maximum 150.
  • include_text — optional boolean; default true.
curl 'https://testerly.net/v1/browser/observe?session_id=agent-1&limit=80&include_text=true' \
  -H 'Authorization: Bearer tly_your_api_key'

Snapshot

GET /v1/browser/snapshot

Uses the same query parameters and response format as observe.

curl 'https://testerly.net/v1/browser/snapshot?session_id=agent-1' \
  -H 'Authorization: Bearer tly_your_api_key'

POST /v1/browser/snapshot

{
  "session_id": "agent-1",
  "limit": 80,
  "include_text": true
}

Perform an Action

POST /v1/browser/action

{
  "action": "click_ref",
  "session_id": "agent-1",
  "ref": "e1",
  "timeout_ms": 5000
}

Supported actions and fields:

  • click — selector; optional button (left, right, or middle), click_count, and hold_ms.
  • click_ref — ref; optional button, click_count, and hold_ms.
  • click_text — text; optional button, click_count, and hold_ms.
  • click_xy — x, y; optional button, click_count, and hold_ms.
  • type — selector, text.
  • fill_ref — ref, text.
  • hover — selector.
  • move — x, y; optional duration_ms and path (see below).
  • press_key — key; optional hold_ms.
  • insert_text — text; inserts a complete text or pasted value efficiently.
  • type_keys — text; optional delay_ms and hold_ms. Presses a key for each character, as typing does (see below).
  • select_option — selector and option.
  • scroll — y.
  • scroll_to_ref — ref.
  • set_viewport — width from 320 to 3840 and height from 480 to 2160.
  • wait — timeout_ms.
  • wait_for_text — text, optional timeout_ms.
  • wait_for_selector — selector, optional timeout_ms.

timeout_ms is capped at 60,000 milliseconds.

move with duration_ms (up to 10,000) moves the mouse there over that time in one request, with a mousemove about every 16 milliseconds, easing in and out. To follow your own curve, send path, up to 500 points such as [{"x": 410, "y": 300}, {"x": 520, "y": 340}]; the mouse starts where it is, passes through each point in order, and reaches each one at an even share of duration_ms. With path, x and y are optional; when sent, they are the last point.

{ "action": "move", "session_id": "agent-1", "x": 640, "y": 380, "duration_ms": 900 }

Clicks and key presses are timed like a person's. Each mouse button is held down for a random 60–140 milliseconds, and each press_key for 50–110. Send hold_ms (up to 2,000) for an exact time; 0 releases at once. click_count is 1 (the default), 2 for a double click, or 3 for a triple click; the pause between clicks equals the hold time. type, fill_ref, and insert_text set the text directly and send no key presses.

type_keys presses and releases a key for each character, so pages see real typing. delay_ms (up to 1,000, default 110) is the average time from one key press to the next; each gap varies by up to 30% either way. Each key is held a random 40–90 milliseconds and released before the next goes down. With hold_ms, every key is held exactly that long, and with delay_ms: 0 the next key follows at once. Characters with no key on a US keyboard, such as é or emoji, are inserted as text. text is up to 2,000 characters, and one request types for at most 60 seconds.

{ "action": "type_keys", "session_id": "agent-1", "text": "Charles Babbage", "delay_ms": 110 }
curl -X POST https://testerly.net/v1/browser/action \
  -H 'Authorization: Bearer tly_your_api_key' \
  -H 'Content-Type: application/json' \
  -d '{"action":"click_ref","session_id":"agent-1","ref":"e1"}'

Screenshot

GET /v1/browser/screenshot

Returns a base64-encoded PNG.

Query parameters:

  • session_id — optional; defaults to default.
  • full_page — optional boolean; captures the full rendered page when true.
curl 'https://testerly.net/v1/browser/screenshot?session_id=agent-1&full_page=true' \
  -H 'Authorization: Bearer tly_your_api_key'

Current HTML

GET /v1/browser/html

Query parameters:

  • session_id — optional; defaults to default.
curl 'https://testerly.net/v1/browser/html?session_id=agent-1' \
  -H 'Authorization: Bearer tly_your_api_key'

Console Events

GET /v1/browser/console

Query parameters:

  • session_id — optional; defaults to default.
  • limit — optional; default 50.
  • level — optional: log, info, warn, error, debug, or pageerror.
curl 'https://testerly.net/v1/browser/console?session_id=agent-1&level=error' \
  -H 'Authorization: Bearer tly_your_api_key'

Network Events

GET /v1/browser/network

Query parameters:

  • session_id — optional; defaults to default.
  • limit — optional; default 50.
  • only_failed — optional boolean.
  • url_contains — optional URL substring.
curl 'https://testerly.net/v1/browser/network?session_id=agent-1&only_failed=true' \
  -H 'Authorization: Bearer tly_your_api_key'

Cookie, Set-Cookie, Authorization, and proxy-authorization header values are always returned as [redacted]. Use the separately permitted cookie API when cookie values are required.

Clear Captured Events

POST /v1/browser/clear_capture

{
  "session_id": "agent-1"
}

Cookies and Browser Storage

These endpoints expose sensitive browser state, including HttpOnly cookies. They are disabled for every account until the operator enables Browser cookies and stored state in the customer resource controls. A disabled account receives 403.

Every operation is isolated by customer and session_id. Web storage, IndexedDB, Cache Storage, and service workers are additionally restricted to the page's current HTTP or HTTPS origin. Navigate the session to the origin before using those endpoints.

Responses are never cached and state values are not written to audit logs. The request route, status, size, and duration are audited normally.

Cookies

GET /v1/browser/cookies?session_id=agent-1 lists the context's cookies, including Secure, HttpOnly, SameSite, expiry, and partition information. Add url=https://example.com/path to filter by URL.

POST /v1/browser/cookies creates or updates up to 100 cookies:

{
  "session_id": "agent-1",
  "cookies": [
    {
      "name": "session",
      "value": "value",
      "url": "https://example.com",
      "secure": true,
      "httpOnly": true,
      "sameSite": "Lax"
    }
  ]
}

Each cookie needs name, value, and either url or domain. Domain cookies may also set path, expires, and the other Chrome cookie attributes.

DELETE /v1/browser/cookies clears matching cookies. Omit selectors or send "all": true to clear all cookies:

{
  "session_id": "agent-1",
  "name": "session",
  "domain": "example.com",
  "path": "/"
}

Local and session storage

GET /v1/browser/storage?session_id=agent-1&scope=local returns all localStorage values for the current origin. Use scope=session for sessionStorage. An optional origin must exactly match the current page.

POST /v1/browser/storage sets string values:

{
  "session_id": "agent-1",
  "scope": "local",
  "origin": "https://example.com",
  "values": {
    "theme": "dark",
    "customer": "123"
  }
}

DELETE /v1/browser/storage removes keys, or clears the selected storage when keys is omitted.

IndexedDB

GET /v1/browser/indexeddb?session_id=agent-1 lists databases. Add database, then optionally store and limit, to inspect schema or records.

POST /v1/browser/indexeddb creates the database/store when needed and writes one JSON-compatible record:

{
  "session_id": "agent-1",
  "database": "app",
  "store": "users",
  "key": "customer-123",
  "value": { "name": "Example" }
}

DELETE /v1/browser/indexeddb deletes a database when only database is sent, clears a store when store is sent, or deletes one record when key is also sent.

Cache Storage and service workers

GET /v1/browser/cache_storage lists cache names. Add cache to list request and response metadata, and include_bodies=true to include up to 64 KiB per entry as base64.

POST /v1/browser/cache_storage writes one GET response using cache, url, optional response status/headers, and either body or body_base64.

DELETE /v1/browser/cache_storage deletes all caches, one named cache, or one URL from a cache depending on which fields are sent.

GET /v1/browser/service_workers lists registrations for the current origin. DELETE /v1/browser/service_workers unregisters all of them, or the exact scope sent in the body.

Export and import state

GET /v1/browser/storage_state?session_id=agent-1 exports cookies, localStorage, sessionStorage, JSON-compatible IndexedDB records, Cache Storage, and service-worker registrations.

POST /v1/browser/storage_state imports a previous response's state into a session currently open on the same origin:

{
  "session_id": "agent-2",
  "origin": "https://example.com",
  "clear_existing": true,
  "state": {
    "version": 1,
    "cookies": [],
    "origins": []
  }
}

Importing may execute service-worker scripts from the exported state. Encoded non-JSON IndexedDB values and truncated cache bodies are not restored. delete_profile: true removes the profile and all retained browser state.

Extract Rendered Document Text

POST /v1/browser/extract_doc_text

Loads a page and returns its rendered text and discovered links.

{
  "url": "https://docs.example.com/api",
  "session_id": "docs-1",
  "wait_until": "networkidle",
  "settle_ms": 800,
  "max_chars": 32000,
  "close_after": false,
  "timeout_ms": 25000
}
  • url — required.
  • session_id — optional.
  • wait_until — optional: commit, domcontentloaded, load, or networkidle.
  • settle_ms — optional; 0 to 5000.
  • max_chars — optional; 1000 to 200000.
  • close_after — optional boolean.
  • timeout_ms — optional; 1000 to 60000.
  • useLocalProxy, proxyCountry, proxyServer, proxyUsername, proxyPassword — optional. Same rules as Proxy. They apply when this call creates the session.
  • timezoneId, locale — optional. Same rules as Timezone and locale.
  • fingerprint — optional. Same rules as Device fingerprint.

Browser Tabs

The active tab is the page used by actions, observations, screenshots, and the live viewer. Links that open a popup or new tab automatically make that tab active.

GET /v1/browser/tabs

curl 'https://testerly.net/v1/browser/tabs?session_id=agent-1' \
  -H 'Authorization: Bearer tly_your_api_key'

The response contains active_tab_id and a tabs array. Each tab has a stable session-scoped id, its index, URL, title, and an active boolean.

POST /v1/browser/tabs

Open a blank tab, or include an HTTP/HTTPS URL:

{
  "session_id": "agent-1",
  "action": "open",
  "url": "https://example.com"
}

Activate an existing tab:

{
  "session_id": "agent-1",
  "action": "activate",
  "tab_id": "tab_example"
}

DELETE /v1/browser/tabs

{
  "session_id": "agent-1",
  "tab_id": "tab_example"
}

Closing the active tab selects the most recently opened remaining tab. The only tab cannot be closed through this endpoint; use close_session to close the browser. Tab IDs expire with the browser session. Tab operations return 409 while an administrator controls the session.

List Sessions

GET /v1/browser/sessions

Returns browser sessions belonging to the authenticated customer.

curl https://testerly.net/v1/browser/sessions \
  -H 'Authorization: Bearer tly_your_api_key'

Close a Session

POST /v1/browser/close_session

{
  "session_id": "agent-1",
  "delete_profile": true
}
  • delete_profile — when true, deletes stored browser state for this session.

Proxy Availability

GET /v1/browser/proxy-status

Returns whether the service proxy is configured. proxy_list.countries has an entry for each country proxyCountry can choose, keyed by two-letter code, with listed, working, failing, and unchecked counts from the latest connection checks, which repeat every 10 minutes. proxy_list.default_country is used when proxyCountry is omitted. It does not show proxy credentials, and it does not say which proxy an open session is using. Send useLocalProxy or proxyServer on the request that creates a session.

curl https://testerly.net/v1/browser/proxy-status \
  -H 'Authorization: Bearer tly_your_api_key'

MCP Server

POST /mcp

A Model Context Protocol server over Streamable HTTP. It lets Claude and other MCP clients drive this account's browsers. It is disabled for every account until the operator enables MCP server for AI agents in the customer resource controls. A disabled account receives 403.

Setup guide for Claude: https://testerly.net/docs/mcp

claude.ai and Claude Desktop

  1. In Claude, open Settings → Connectors → Add custom connector.
  2. Enter https://testerly.net/mcp as the URL. Leave the OAuth client fields empty; Claude registers itself.
  3. Sign in to your Testerly account on the page that opens and choose Allow access.

The connection appears as an API key on your account, named after the client. Access tokens last one hour and refresh automatically; Testerly can revoke the key at any time. Turning MCP access off for the account stops the connection on its next request.

OAuth endpoints, for other clients:

  • GET /.well-known/oauth-protected-resource/mcp — resource metadata (RFC 9728).
  • GET /.well-known/oauth-authorization-server — server metadata (RFC 8414).
  • POST /oauth/register — dynamic client registration (RFC 7591). Redirect URIs must be HTTPS, or HTTP on a loopback address.
  • GET /oauth/authorize — consent page. Requires PKCE with S256.
  • POST /oauth/token — authorization_code and refresh_token grants. Refresh tokens rotate; reusing one revokes the connection.
  • POST /oauth/revoke — revokes the connection (RFC 7009).

API key

Clients that send a header can use the same API key as the REST API:

Authorization: Bearer tly_your_api_key

Claude Code:

claude mcp add --transport http testerly https://testerly.net/mcp \
  --header 'Authorization: Bearer tly_your_api_key'

Claude API MCP connector:

{
  "mcp_servers": [
    {
      "type": "url",
      "url": "https://testerly.net/mcp",
      "name": "testerly",
      "authorization_token": "tly_your_api_key"
    }
  ]
}

Every tool call is the corresponding /v1/browser/* request: it uses the same sessions, limits, proxy, fingerprint, and browser-state permissions, returns 409-style errors while an administrator controls the session, and is audited the same way. Tools and fields the account is not allowed to use are not listed. With live media, browser_navigate and browser_extract_doc_text accept media; the audio itself always flows over the media WebSocket.

Tool Operation
browser_navigate POST /v1/browser/navigate
browser_observe GET /v1/browser/observe
browser_action POST /v1/browser/action
browser_screenshot GET /v1/browser/screenshot, returned as an image
browser_html GET /v1/browser/html
browser_console GET /v1/browser/console
browser_network GET /v1/browser/network
browser_clear_capture POST /v1/browser/clear_capture
browser_tabs GET|POST|DELETE /v1/browser/tabs
browser_extract_doc_text POST /v1/browser/extract_doc_text
browser_list_sessions GET /v1/browser/sessions
browser_close_session POST /v1/browser/close_session
browser_proxy_status GET /v1/browser/proxy-status
browser_cookies /v1/browser/cookies, with browser-state access
browser_storage /v1/browser/storage, with browser-state access
browser_indexeddb /v1/browser/indexeddb, with browser-state access
browser_cache_storage /v1/browser/cache_storage, with browser-state access
browser_service_workers /v1/browser/service_workers, with browser-state access
browser_storage_state /v1/browser/storage_state, with browser-state access
browser_screen_share /v1/browser/screen_share, with live media
browser_media_stream Returns the media WebSocket URL and format for a session, with live media

Live Media

Live media gives a session its own speaker and microphone, streamed over a WebSocket, and lets a page such as Google Meet present a tab you choose. It is disabled for every account until the operator enables Live media in the customer resource controls. A disabled account receives 403.

Open a session with live media

Send media on the request that creates the session:

{
  "url": "https://meet.google.com/abc-defg-hij",
  "session_id": "meet-1",
  "media": { "audio": true, "screen_share": true }
}
  • audio — the session gets a private speaker and virtual microphone. Microphone and camera permissions are granted automatically, with no prompt. The session has no camera device, so meeting sites show the camera as off.
  • screen_share — allows choosing a tab to present; see Tab sharing.

media is ignored when the session is already open. Responses that describe a session include media with the two values in effect.

GET wss://testerly.net/v1/browser/media

wss://testerly.net/v1/browser/media?session_id=meet-1&sample_rate=16000

Authenticate the handshake with the same header as the REST API:

Authorization: Bearer tly_your_api_key
Parameter Values Default
session_id A session opened with media.audio: true required
sample_rate 16000 or 48000, used in both directions 16000

One stream is active per session. A new connection to the same session replaces the previous one, which is closed with 4000; use this to reconnect. An open stream counts as activity, so a session that is only listening is not closed as idle.

Frames. Binary frames are audio: raw PCM, signed 16-bit little-endian, mono, at the chosen rate, with no headers. Text frames are JSON control messages.

  • Meeting audio is sent in 20 ms frames: 640 bytes at 16 kHz, 1,920 bytes at 48 kHz.
  • Microphone audio may be sent in frames of any length up to one second, containing whole samples (an even number of bytes). Frames are queued and played into the microphone in order.

Messages from Testerly:

{ "type": "start", "session_id": "meet-1", "encoding": "pcm_s16le", "sample_rate": 16000, "channels": 1, "frame_ms": 20 }
{ "type": "mark", "name": "reply-42" }
{ "type": "cleared" }
{ "type": "error", "message": "..." }

Messages from the client:

{ "type": "clear" }
{ "type": "mark", "name": "reply-42" }

Echo. The audio you receive is what the session's pages play: the mixed audio of the other participants, plus the site's own sounds such as join chimes. It does not include what you send into the microphone; the speaker and microphone are separate devices with no loopback.

Interruptions. clear drops all microphone audio that has not been played and stops playback at once; Testerly answers cleared. Send a mark after each piece of speech: it is sent back when the audio before it has been played. Marks still queued when you clear are discarded.

Handshake status Meaning
401 Missing or invalid API key
403 Live media is not enabled for the account
422 Invalid session_id or sample_rate
Close code Meaning
1000 The session was closed
4000 Replaced by a newer connection
4404 The session does not exist or was not opened with media.audio
4409 An administrator is controlling the session
import WebSocket from "ws";

const ws = new WebSocket(
  "wss://testerly.net/v1/browser/media?session_id=meet-1&sample_rate=16000",
  { headers: { Authorization: `Bearer ${process.env.TESTERLY_KEY}` } },
);

ws.on("message", (data, isBinary) => {
  if (isBinary) {
    stt.write(data); // 20 ms of PCM s16le mono 16 kHz from the meeting
  } else {
    const msg = JSON.parse(data.toString());
    if (msg.type === "mark") onSpoken(msg.name);
  }
});

tts.on("audio", (pcm) => ws.send(pcm));
tts.on("sentenceEnd", (id) => ws.send(JSON.stringify({ type: "mark", name: id })));
stt.on("speechStart", () => ws.send(JSON.stringify({ type: "clear" })));

Tab sharing

The session needs media.screen_share: true.

  1. Open the tab to present with POST /v1/browser/tabs (action: "open" and a url). The response includes its id.

  2. Choose it with POST /v1/browser/screen_share:

    { "session_id": "meet-1", "tab_id": "tab_example" }
    
  3. In the meeting tab, click the site's share button (in Google Meet, Share screen) with POST /v1/browser/action. When the site asks what to present, the chosen tab is selected automatically.

Tab capture does not show the mouse. Add "show_cursor": true when choosing the tab to draw a pointer on it, so viewers can follow what is clicked:

{ "session_id": "meet-1", "tab_id": "tab_example", "show_cursor": true }

The pointer follows move, click_xy, click, hover, and the other mouse actions while the chosen tab is the active tab, gliding to each new position and showing a ripple on each click. It becomes a hand over links and buttons and a text cursor over text fields, stays across navigation and reloads, takes no clicks or focus, and is not part of observe. Choosing the tab again without show_cursor, choosing another tab, or DELETE removes it.

Stop presenting with the site's own button. GET /v1/browser/screen_share?session_id=meet-1 returns tab_id for the chosen tab, or null, and show_cursor. DELETE /v1/browser/screen_share with session_id stops choosing a tab. Only the chosen tab is ever shared. Choose the tab before clicking the share button; when no tab is chosen, the share request waits and nothing is shared. A session without media.screen_share returns 409.

Camera Image

A session can show an image as its camera. Pages that ask for the camera, including pages in frames, receive a camera that plays the image, looping animations at their own frame timing. Only still and animated images are accepted: PNG, JPEG, GIF, and WebP, up to 8 MB and 4096 × 4096 pixels, with at most 300 frames. Video is not accepted. Every frame is decoded and re-encoded, at most 1280 pixels on its longest side. The camera image is off by default; ask Testerly to enable it for your account.

The camera exists only while an image is set. It works on any open session, and pages that are already open switch at once; a page that is already playing the camera keeps playing it with the new image. Clearing the image removes the camera, and tracks that were playing it end. Microphone audio from media.audio is unaffected.

POST /v1/browser/camera

Send exactly one of image_url and image_base64.

{ "session_id": "kyc-1", "image_url": "https://example.com/id-card.png" }
{ "session_id": "kyc-1", "image_base64": "data:image/gif;base64,R0lGODlh..." }

image_url must be a public http or https address. It is downloaded through the session's own network route, and a redirect is refused, so send the final address of the image. image_base64 may be plain base64 or a data: URL.

{
  "status": "success",
  "session_id": "kyc-1",
  "camera": true,
  "image": {
    "width": 1280,
    "height": 720,
    "frames": 24,
    "duration_ms": 2400,
    "label": "Integrated Camera"
  }
}

GET /v1/browser/camera

GET /v1/browser/camera?session_id=kyc-1 returns the same body, with camera: false and image: null when no image is set.

DELETE /v1/browser/camera

Send session_id to remove the camera.

Status Meaning
403 The camera image is not enabled for the account
404 The session is not open
413 The image is larger than 8 MB
422 Not a PNG, JPEG, GIF, or WebP image, too many pixels or frames, both or neither source sent, or the URL could not be downloaded

Error Statuses

  • 400 — invalid request.
  • 401 — missing or invalid API key.
  • 403 — suspended or archived customer, or the account is not allowed to use the requested proxy, device fingerprint, cookies, stored browser state, live media, the camera image, or the MCP server.
  • 413 — request body is too large.
  • 422 — invalid body or query field.
  • 409 — an administrator is controlling this session, so the request is not applied.
  • 429 — customer or service session limit reached.
  • 503 — browser or requested proxy is unavailable.