Live view & handoff
Watch a session or let a person take control.
With an initialized client and an authorized session ID:
const viewer = await client.sessions.connections.create(sessionId, {
type: "live",
mode: "view",
});
// Deliver viewer.url only to the authorized person.Python: connections.create(session_id, type="live", mode="view").
| Parameter | Type | Required | Description |
|---|---|---|---|
type | string | Yes | live |
mode | string | Yes | view or control |
handoffId | string | For control | Active handoff ID |
Watch or control
| Action | Effect |
|---|---|
| Open Live view | Read-only; automation continues |
| Take control | Start a handoff and revoke old automation control |
| Return to automation | Complete the handoff; reconnect with a fresh CDP grant |
| Close the viewer | Leave the browser running |
The viewer shows the same tabs and website state. Watching does not extend lifetime or pause billing. Check expiresAt before opening a new connection.
Use the console's Take control and Return to automation, or the handoff API. For your own product, see application embedding.