# Who controls a connected cloud browser

> The control state of a cloud browser session that is connected now.

Source: https://docs.spicrawl.com/api-reference/browser/browser-session-get

## GET /v1/browser/sessions/{id}

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

The control state of a cloud browser session that is connected now. A session exists from its
connect until its socket closes; after that, and for another organization's session, this is 404.
Poll it after sending a person a live view, and continue once `controller` is `agent` again.
Requires the `browser` scope; the key in the `Authorization` header.

### Example

```bash
curl "https://api.spicrawl.com/v1/browser/sessions/{id}" \
  -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

Who drives the session, sent with Cache-Control no-store.

`application/json`.

| Field | Type | Required | Description |
|---|---|---|---|
| `session_id` | string | yes |  |
| `status` | string | yes |  |
| `controller` | string | yes | `agent` (your CDP connection drives) or `human` (a person in the live view drives). |
| `expires_at` | string (date-time) | yes | When the session ends at the latest (its `session_ttl`). |

#### 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).

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