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

# Examples

> Runnable examples for the VZaps PHP SDK on GitHub

The official PHP SDK repository includes runnable Composer projects that mirror the flows documented in this guide.

## GitHub repository

All examples live in the [`examples/`](https://github.com/VZaps/vzaps-sdk-php/tree/main/examples) folder:

**[github.com/VZaps/vzaps-sdk-php](https://github.com/VZaps/vzaps-sdk-php)**

Each numbered folder is a standalone project with its own `composer.json`, `config.example.php`, and `run.php`.

See [`examples/README.md`](https://github.com/VZaps/vzaps-sdk-php/blob/main/examples/README.md) in the repository for the full module list.

## What's included

| Folder                                   | Topic                                |
| ---------------------------------------- | ------------------------------------ |
| `01-auth-and-list-instances`             | Auth and instance listing            |
| `02-create-instance`                     | Create instance                      |
| `03-instance-subscription`               | Billing subscription                 |
| `04-session-and-pairing`                 | Session status, QR, and pairing code |
| `05-configure-webhook`                   | Webhook configuration                |
| `06-realtime-subscribe`                  | Realtime WebSocket subscription      |
| `07-send-text-message`                   | Send text message                    |
| `08-send-media-and-interactive`          | Media, buttons, and list             |
| `09-send-poll-reaction-and-chat-actions` | Poll, reaction, and chat actions     |
| `10-queues`                              | Message and operation queues         |
| `11-typebot-and-chatwoot`                | TypeBot and Chatwoot                 |
| `quickstart`                             | Minimal list + send text flow        |
| `worker-realtime`                        | Realtime worker with deduplication   |

## Option A — one example folder (recommended)

You do **not** need to clone the full SDK repository.

1. Download only the example folder, for example [`07-send-text-message`](https://github.com/VZaps/vzaps-sdk-php/tree/main/examples/07-send-text-message), using **Download ZIP** on GitHub, or run:

```bash theme={null}
npx --yes degit VZaps/vzaps-sdk-php/examples/07-send-text-message vzaps-php-send-text
cd vzaps-php-send-text
```

2. Configure and run:

```bash theme={null}
cp config.example.php config.php
composer install
php run.php
```

Edit `config.php` with your `clientToken`, `clientSecret`, `instanceId`, and `instanceToken` before running.

## Option B — sparse checkout

Download only part of the repository with Git:

```bash theme={null}
git clone --depth 1 --filter=blob:none --sparse https://github.com/VZaps/vzaps-sdk-php.git
cd vzaps-sdk-php
git sparse-checkout set examples/07-send-text-message
cd examples/07-send-text-message
cp config.example.php config.php
composer install
php run.php
```

## Option C — full repository clone

Use this when you want every example locally or you are contributing to the SDK:

```bash theme={null}
git clone https://github.com/VZaps/vzaps-sdk-php.git
cd vzaps-sdk-php/examples/07-send-text-message
cp config.example.php config.php
composer install
php run.php
```

## Next steps

* Follow the [Starter Guide](/en/sdk/php/starter-guide) for a guided walkthrough.
* See [Messages](/en/sdk/php/messages) for every send method.
