PHPackages                             softlivery/whatsapp-cloud-api-client - 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. softlivery/whatsapp-cloud-api-client

ActiveLibrary[API Development](/categories/api)

softlivery/whatsapp-cloud-api-client
====================================

A client library for WhatsApp Cloud API.

v1.0.0(2mo ago)010Apache-2.0PHPPHP &gt;=8.1

Since Jul 16Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/Softlivery/whatsapp-cloud-api-client)[ Packagist](https://packagist.org/packages/softlivery/whatsapp-cloud-api-client)[ RSS](/packages/softlivery-whatsapp-cloud-api-client/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelogDependencies (1)Versions (6)Used By (0)

Whatsapp Cloud API Client
=========================

[](#whatsapp-cloud-api-client)

An open-source Whatsapp Cloud API client for PHP that simplifies webhook handling and event dispatching.

---

Features
--------

[](#features)

- Full message sending helpers (text, media, template, contacts, location, reaction, interactive).
- Media operations (upload, fetch metadata, delete).
- Template management and analytics helpers.
- WABA operations (phone numbers, assigned users/partners, conversation analytics, profiles).
- Parses and validates webhook payloads, including recent account events.
- Verifies webhook challenges through Facebook's Hub Verification token.

---

Installation
------------

[](#installation)

You can install the package using `composer`:

```
composer require softlivery/whatsapp-cloud-api-client
```

---

OAuth Code Exchange Contract
----------------------------

[](#oauth-code-exchange-contract)

For embedded signup flows, use `OAuthHelper::exchangeCode($code, $redirectUri)` to request:

- `GET /oauth/access_token`
- query params: `client_id`, `client_secret`, `code`, `redirect_uri`

`redirect_uri` behavior:

- The library always includes `redirect_uri` in the request query.
- Empty `redirect_uri` is currently allowed for compatibility.
- For production stability, prefer sending the exact redirect URI configured in Meta/Facebook app settings.

Example:

```
