PHPackages                             bootdesk/chat-sdk-adapter-whatsapp - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. bootdesk/chat-sdk-adapter-whatsapp

ActiveLibrary[API Development](/categories/api)

bootdesk/chat-sdk-adapter-whatsapp
==================================

WhatsApp adapter for bootdesk/chat-sdk-core

0.4.44(2w ago)0167MITPHPPHP &gt;=8.2

Since Jun 4Pushed 1w agoCompare

[ Source](https://github.com/bootdesk/chat-sdk-adapter-whatsapp)[ Packagist](https://packagist.org/packages/bootdesk/chat-sdk-adapter-whatsapp)[ RSS](/packages/bootdesk-chat-sdk-adapter-whatsapp/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (16)Versions (38)Used By (0)

bootdesk/chat-sdk-adapter-whatsapp
==================================

[](#bootdeskchat-sdk-adapter-whatsapp)

WhatsApp Business API adapter for the laravel-bootdesk multi-platform messaging framework.

Install
-------

[](#install)

```
composer require bootdesk/chat-sdk-adapter-whatsapp
```

Requires a PSR-18 HTTP client (`guzzlehttp/guzzle`, `symfony/http-client`, etc.) and a PSR-17 factory (`nyholm/psr7` bundled).

Configuration
-------------

[](#configuration)

VariableDescriptionExample`access_token`WhatsApp Cloud API Access Token`EAAx...``http_client`PSR-18 HTTP client instance`new GuzzleHttp\Client``phone_number_id`Phone Number ID`9876543210``app_secret`Meta App Secret`abc123...``verify_token`Webhook Verify Token`my-verify-token````
use BootDesk\ChatSDK\WhatsApp\WhatsAppAdapter;

$adapter = new WhatsAppAdapter(
    accessToken: env('WHATSAPP_ACCESS_TOKEN'),
    httpClient: new \GuzzleHttp\Client,
    phoneNumberId: env('WHATSAPP_PHONE_NUMBER_ID'),
    appSecret: env('WHATSAPP_APP_SECRET'),
    verifyToken: env('WHATSAPP_VERIFY_TOKEN'),
);
```

### Laravel

[](#laravel)

The `ChatServiceProvider` auto-binds `Psr\Http\Client\ClientInterface` to `GuzzleHttp\Client`. Add to `config/chat.php`:

```
'whatsapp' => [
    'access_token'    => env('WHATSAPP_ACCESS_TOKEN'),
    'phone_number_id' => env('WHATSAPP_PHONE_NUMBER_ID'),
    'app_secret'      => env('WHATSAPP_APP_SECRET'),
    'verify_token'    => env('WHATSAPP_VERIFY_TOKEN'),
],
```

Quick Example
-------------

[](#quick-example)

```
// Send a message to a phone number
$adapter->postMessage('whatsapp:+15551234567', 'Hello from laravel-bootdesk!');
```

Text Formatting
---------------

[](#text-formatting)

WhatsApp supports `*bold*`, `_italic_`, `~strikethrough~`, ``monospace``, ` `code blocks` `, bullet lists (`*`/`-`), numbered lists (`1.`), and quotes (`>`). The SDK's `WhatsAppFormatConverter` automatically converts standard markdown (`**bold**`, `~~strike~~`) to WhatsApp format when sending, and converts WhatsApp syntax back to standard markdown when receiving.

Template Messages
-----------------

[](#template-messages)

WhatsApp supports pre-approved message templates for notifications, alerts, and marketing. Send them via `PostableMessage::template()`:

```
use BootDesk\ChatSDK\WhatsApp\WhatsAppTemplate;

$adapter->postMessage(
    'whatsapp:phone123:5511999999999',
    PostableMessage::template(
        WhatsAppTemplate::create('order_confirmation', 'en_US')
            ->bodyParam('John')
            ->bodyParam('#12345')
            ->buttonParam('Track Order', 'track_payload')
    )
);
```

### WhatsAppTemplate API

[](#whatsapptemplate-api)

MethodDescription`create(string $name, string $language)`Factory with template name and language code`positional()`Use positional `{{1}}`, `{{2}}` format (default)`named()`Use named `{{first_name}}` format; `bodyParam()` then takes `(text, parameterName)``bodyParam(string $text, ?string $parameterName = null)`Adds a body parameter; pass `parameterName` for named format`headerImage(string $link)`Header image media`headerVideo(string $link)`Header video media`headerDocument(string $link, ?string $filename)`Header document media`headerText(string $text)`Header text parameter`buttonParam(string $label, string $payload = '', string $subtype = 'quick_reply')`Button parameter; `payload` defaults to `label` if omittedSerializes to WhatsApp API format:

```
{
  "type": "template",
  "template": {
    "name": "order_confirmation",
    "language": { "code": "en_US" },
    "components": [
      {
        "type": "body",
        "parameters": [
          { "type": "text", "text": "John" },
          { "type": "text", "text": "#12345" }
        ]
      },
      {
        "type": "button",
        "sub_type": "quick_reply",
        "index": 0,
        "parameters": [{ "type": "quick_reply", "payload": "track_payload" }]
      }
    ]
  }
}
```

### Named parameters

[](#named-parameters)

Templates using `{{first_name}}` instead of `{{1}}`:

```
WhatsAppTemplate::create('order_confirmation', 'en_US')
    ->named()
    ->bodyParam('Jessica', 'first_name')
    ->bodyParam('SKBUP2-4CPIG9', 'order_number');
```

Sends `parameter_name` on each parameter and `parameter_format: "named"` at the template level. Omit `->named()` (or call `->positional()`) for positional `{{1}}` format.

Falls back to markdown text via `__toString()` when an adapter doesn't support templates.

Thread ID Format
----------------

[](#thread-id-format)

FormatDescription`whatsapp:{phoneNumberId}`One thread per phone number (missing user ID uses fallback)`whatsapp:{phoneNumberId}:{userPhoneNumber}`Thread with known phone number`whatsapp:{phoneNumberId}:{bsuid}`Thread identified by Business-Scoped User IDWebhook
-------

[](#webhook)

WhatsApp Cloud API sends webhook payloads. Verify requests using HMAC signature verification with the app secret.

### BSUID (Business-Scoped User ID) Support

[](#bsuid-business-scoped-user-id-support)

As of May 2026, WhatsApp supports BSUIDs — a user identifier independent of phone numbers. The adapter transparently handles both identifiers:

- **Inbound**: reads `from` (phone) with fallback to `from_user_id` (BSUID)
- **Outbound**: detects BSUID format (`XX.xxxx`) and uses `recipient` instead of `to`
- **Thread IDs**: use whatever identifier was available in the webhook

Feature Matrix
--------------

[](#feature-matrix)

FeatureSupportedPost messages✓Edit messages✗Delete messages✗Reactions✓Slash commands✓Typing indicator✓Fetch messages✓Fetch thread info✗Fetch channel info✗Get user✗Open DM✗Stream✓Notes
-----

[](#notes)

WhatsApp Business API only. No edit or delete support in the WhatsApp Cloud API.

Documentationn
--------------

[](#documentationn)

Full API documentation:

License
-------

[](#license)

MIT

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance97

Actively maintained with recent releases

Popularity15

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

37

Last Release

14d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3874705?v=4)[Vin](/maintainers/tryvin)[@tryvin](https://github.com/tryvin)

---

Top Contributors

[![tryvin](https://avatars.githubusercontent.com/u/3874705?v=4)](https://github.com/tryvin "tryvin (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bootdesk-chat-sdk-adapter-whatsapp/health.svg)

```
[![Health](https://phpackages.com/badges/bootdesk-chat-sdk-adapter-whatsapp/health.svg)](https://phpackages.com/packages/bootdesk-chat-sdk-adapter-whatsapp)
```

###  Alternatives

[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k16](/packages/tempest-framework)[mollie/mollie-api-php

Mollie API client library for PHP. Mollie is a European Payment Service provider and offers international payment methods such as Mastercard, VISA, American Express and PayPal, and local payment methods such as iDEAL, Bancontact, SOFORT Banking, SEPA direct debit, Belfius Direct Net, KBC Payment Button and various gift cards such as Podiumcadeaukaart and fashioncheque.

60316.0M89](/packages/mollie-mollie-api-php)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

85036.3k](/packages/flow-php-flow)[getbrevo/brevo-php

Official Brevo provided RESTFul API V3 php library

1003.9M50](/packages/getbrevo-brevo-php)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6942.5M425](/packages/drupal-core-recommended)[telnyx/telnyx-php

Official Telnyx PHP SDK — APIs for Voice, SMS, MMS, WhatsApp, Fax, SIP Trunking, Wireless IoT, Call Control, and more. Build global communications on Telnyx's private carrier-grade network.

36789.4k2](/packages/telnyx-telnyx-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
