# Get a live view link for a connected cloud browser

> A link a person opens to watch the cloud browser your CDP connection is driving and take control of it: the same tabs, cookies and page.

Source: https://docs.spicrawl.com/api-reference/browser/browser-live-view

## POST /v1/browser/sessions/{id}/live

Operation ID: `browserLiveView`. API key scope: `browser`.

A link a person opens to watch the cloud browser your CDP connection is driving and take control
of it: the same tabs, cookies and page. Use it when a page needs a human, such as a login, a
one-time code or a captcha. `live_view_url` is a page; `live_url` is its WebSocket, for building
your own viewer. Both carry a viewer token (`wbv_` and 64 hex characters) that works once and
expires 60 s after this call if unused; ask again for a new one.

While the person has control, your connection's input commands (`Input.*`), navigation
(`Page.navigate`, `Page.reload`, `Page.navigateToHistoryEntry`) and tab changes
(`Target.createTarget`, `Target.closeTarget`, `Target.activateTarget`) are answered with CDP error
-32001 instead of reaching the browser; reading the page keeps working. The viewer streams the
page and sends input only while it holds control. Watching is not billed beyond the session's
own per-minute price, and the live view ends when the session does. A browser that cannot take a
second viewer answers the live view's WebSocket with 409 `ERR::REQUEST::CONFLICT`.

### Example

```bash
curl -X POST "https://api.spicrawl.com/v1/browser/sessions/{id}/live" \
  -H "Authorization: Bearer $SPICRAWL_API_KEY"
```

### Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `id` | path | string | yes | The `session_id` that `POST /v1/browser/token` returned for this connection. An unknown, closed or other organization's session answers 404 `ERR::REQUEST::NOT_FOUND`. |

### Responses

#### 200

The live view links, sent with Cache-Control no-store.

`application/json`.

| Field | Type | Required | Description |
|---|---|---|---|
| `session_id` | string | yes |  |
| `live_view_url` | string | yes | The viewer page. The WebSocket URL rides in its fragment, which a browser never sends to a server. |
| `live_url` | string | yes |  |
| `expires_in` | integer | yes |  |
| `single_use` | boolean | yes |  |

#### 401

Missing, invalid, revoked or expired key. Not retryable with the same key.

Headers: `X-Request-Id`.

`application/problem+json` (`Problem` schema).

#### 403

The key lacks the scope this route requires (`ERR::AUTH::INSUFFICIENT_SCOPE`), or the action is not permitted.

Headers: `X-Request-Id`.

`application/problem+json` (`Problem` schema).

#### 404

No such resource for this key's organization.

Headers: `X-Request-Id`.

`application/problem+json` (`Problem` schema).

#### 503

No proxy exit or engine capacity was available. Retryable after `Retry-After`; 0 credits.

Headers: `Retry-After`, `X-Request-Id`.

`application/problem+json` (`Problem` schema).

Full OpenAPI spec: https://docs.spicrawl.com/openapi.yaml
