> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vzaps.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Session

> WhatsApp session status, QR code, pairing, and disconnect

Use `sessions` for pairing, status checks, and WhatsApp session disconnect.

For instances and billing, see [Instances and billing](/en/sdk/python/instances-and-billing). For chats, see [Chats](/en/sdk/python/chats).

## Session

### `client.sessions.status(instance_id, instance_token=...)`

```python theme={null}
status = client.sessions.status("VZ...", instance_token="instance-token")
```

Returns `SessionStatusResponse`. The `data` object uses this field order:

1. `connected` — always first
2. `phone`
3. `whatsapp_jid`
4. `push_name`
5. `business_name`
6. `business_profile` — subfields: `businessHoursTimezone`, `categories`, `profileOptions`, `address`, `email`
7. `profile_picture_id`
8. `profile_picture_url`
9. `profile_url`
10. `verified_name` — `about`, `website` (when applicable)

When disconnected, `data` only has `connected=False`. Empty fields are omitted.

### `client.sessions.qr(instance_id, instance_token=...)`

```python theme={null}
qr = client.sessions.qr("VZ...", instance_token="instance-token")
```

**Return:** envelope `{ code, success, data }`. When not connected yet, `data.qr_code` (PNG data URL). When already connected, `data.status` and `data.phone`.

### `client.sessions.pair_code(instance_id, phone, instance_token=...)`

```python theme={null}
pair_code = client.sessions.pair_code(
    "VZ...",
    "5511999999999",
    instance_token="instance-token",
)
```

**Return:** envelope `{ code, success, data }` with `data.linking_code` (pairing code).

### `client.sessions.disconnect(instance_id, instance_token=...)`

```python theme={null}
client.sessions.disconnect("VZ...", instance_token="instance-token")
```

**Return:** `InstanceActionResponse` — `instance_id`, `status`, `details`.
