> ## 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/dotnet/instances-and-billing). For chats, see [Chats](/en/sdk/dotnet/chats).

## Session

### `client.Sessions.StatusAsync<TResponse>(instanceId, options?)`

```csharp theme={null}
await client.Sessions.StatusAsync<object>("VZ...", new InstanceRequestOptions { InstanceToken = "instance-token" });
```

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

1. `Connected` — always first
2. `Phone`
3. `WhatsappJid`
4. `PushName`
5. `BusinessName`
6. `BusinessProfile` — subfields: `BusinessHoursTimezone`, `Categories`, `ProfileOptions`, `Address`, `Email`
7. `ProfilePictureId`
8. `ProfilePictureUrl`
9. `ProfileUrl`
10. `VerifiedName` — `about`, `website` (when applicable)

When disconnected, `Data` only has `Connected = false`. Empty fields are omitted.

### `client.Sessions.QrAsync<TResponse>(instanceId, options?)`

```csharp theme={null}
await client.Sessions.QrAsync<object>("VZ...", new InstanceRequestOptions { InstanceToken = "instance-token" });
```

**Return:** envelope `{ Code, Success, Data }`. When not connected yet, `Data.QrCode` (PNG data URL). When already connected, `Data.Status` and `Data.Phone`.

### `client.Sessions.PairCodeAsync<TResponse>(instanceId, phone, options?)`

```csharp theme={null}
await client.Sessions.PairCodeAsync<object>("VZ...", "5511999999999", new InstanceRequestOptions { InstanceToken = "instance-token" });
```

**Return:** envelope `{ Code, Success, Data }` with `Data.LinkingCode` (pairing code).

### `client.Sessions.DisconnectAsync<TResponse>(instanceId, options?)`

```csharp theme={null}
await client.Sessions.DisconnectAsync<object>("VZ...", new InstanceRequestOptions { InstanceToken = "instance-token" });
```

**Return:** `InstanceActionResponse` — `InstanceId`, `Status`, `Details`.
