Share a browser link

Give a teammate or a job its own browser link: create it, build its connection URL, set session defaults and a connection cap, then revoke or rotate its token.

Updated

A browser link gives someone a browser without your API token. This guide shows how to create a link, build its connection URL, set its defaults and stop it.

A link belongs to a project. It has:

  • A token that opens sessions on wss://api.wayfern.com/ws. It cannot call the REST APIs.
  • A cap on open connections, from 1 to 100 (default 10).
  • An optional expiry date.
  • Session defaults: viewport, exit, your own proxy and recording.

Anyone with the token can open sessions, and every session bills to the owner of the project. Project owners and admins can see the token. Members cannot, but they can watch live sessions and replays.

Give each person, job or customer account its own link. Then you can cap, revoke or rotate one without the others.

Create it on the project page in the dashboard, or call the API with a dashboard session token. Owners and admins can create links.

curl -X POST https://api.wayfern.com/api/projects/$PROJECT_ID/links \
  -H "Authorization: Bearer $DASHBOARD_JWT" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "ci-checkout-tests",
    "maxConcurrentConnections": 5,
    "expiresAt": "2026-12-31T23:59:59.000Z",
    "viewport": { "width": 1366, "height": 768 },
    "recordSessions": false
  }'

name is required, 1 to 255 characters, and must be unique in the project. A duplicate name returns 409. The response holds the link with its token.

Build the connection URL

The basic URL is the token alone:

wss://api.wayfern.com/ws?token=$WAYFERN_LINK_TOKEN

Add parameters to change one connection:

ParameterEffect
width, heightViewport in CSS pixels
proxyown, residential or none
country, region, city, ispResidential exit location
sessionHold one residential exit IP
record=0Do not record this session

URL parameters win over the link’s defaults. No parameter carries a credential. The login of your own proxy stays on the link.

The link page in the dashboard has a connection URL builder. It adds the parameters as you choose them and shows Playwright and Puppeteer code. It masks the token on screen. Copy copies the full URL.

Set session defaults

Change the defaults with PATCH /api/projects/{projectId}/links/{linkId}, or on the link page:

  • viewport: a width and height, or null for the browser’s own size.
  • proxyMode: wayfern for Wayfern’s exits, or own for the proxy in ownProxy.
  • ownProxy: your proxy, or null to remove it.
  • recordSessions: record every session as a replay.
  • maxConcurrentConnections and expiresAt.
  • Past maxConcurrentConnections, a new connection closes with code 4003.
  • The concurrency cap of the owner’s plan still applies to open pages across all links.
  • After expiresAt, the gateway refuses the token with code 4002. Send null to remove the expiry.

Revoke, rotate or delete

ActionRouteResult
RevokePOST .../links/{linkId}/revokeNew connections with the token close with 4002
RegeneratePOST .../links/{linkId}/regenerateA new token. The old one stops working for new connections
DeleteDELETE .../links/{linkId}Removes the link. Returns 204

The gateway checks the token only when a connection opens. Sessions that are already open keep running after a revoke or a regenerate, until they close. Regenerate also clears a revoke, so it is the way to use a revoked link again.

To give a person access to the project itself, invite them from the project’s members page. See API tokens and scopes for REST access and the Browser API reference for the full list of close codes.