Token scopes
A read-only viewer and an interactive viewer can watch the same session at the same time. A live view token only opens the live view: it cannot connect over CDP or call the browser’s APIs.
Enable at session creation
Setsession.scoped_access.active to true when you create a session. The response then carries one URL per scope, each with its own token:
live_view.read_only, no live view can interact: live_view_url is the same read-only URL as live_view_read_only_url, and cdp_url keeps full control.
Mint more tokens
To mint more token URLs for a running session, for example one per end user, callPOST /v1/sessions/{session_id}/tokens. Pass scopes to choose which URLs to mint, or omit it for every URL the session can serve. Every call returns new tokens:
scopes is omitted:
- A headful session gets all three URLs.
- A headless session gets only
cdp_url, because live view tokens require a headful browser. - A
live_view.one_time_urlsession gets nolive_view_url.
Revoke a token
To revoke a token, pass thetoken from its URL to DELETE /v1/sessions/{session_id}/tokens/{token}. The URL stops opening new connections; a connection that is already open stays until it closes:
Session id access
On a scoped session the session id is no longer a credential on its own: connecting to CDP or the live view with only?sessionId= is refused. Connect with a token (?token=), or with the session id and a token (?sessionId=...&token=...).
Any other session switches to tokens the same way as soon as you mint a token for it. Sessions that never use tokens keep working with the session id alone.
Limitations
- Tokens stop working when the session ends.
scoped_accessrequires a headful cloud browser and cannot be combined withlive_view.one_time_url.- Batch and async session creation do not accept
scoped_access. For those sessions, mint tokens withPOST /v1/sessions/{session_id}/tokensonce the session is running. - Tokens cannot be minted for sessions that run on a connector or a Mac.

