PHPackages                             excelle-insights/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. [Templating &amp; Views](/categories/templating)
4. /
5. excelle-insights/whatsapp

ActiveLibrary[Templating &amp; Views](/categories/templating)

excelle-insights/whatsapp
=========================

WhatsApp Cloud API integration package — OAuth, template messaging, business profiles, webhooks, and HTTP request logging

v1.0.3(3d ago)05MITPHP ^8.1

Since Jul 7Compare

[ Source](https://github.com/excelle-insights/whatsapp)[ Packagist](https://packagist.org/packages/excelle-insights/whatsapp)[ Docs](https://github.com/excelle-insights/whatsapp)[ RSS](/packages/excelle-insights-whatsapp/feed)WikiDiscussions Synced today

READMEChangelogDependencies (3)Versions (8)Used By (0)

Excelle Insights WhatsApp Cloud API
===================================

[](#excelle-insights-whatsapp-cloud-api)

[![Latest Version](https://camo.githubusercontent.com/527529d33d0ca69e70252825e30acd546a930bc15b11d7b3c0f7bcfdf2e81e7a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f657863656c6c652d696e7369676874732f77686174736170702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/excelle-insights/whatsapp)[![PHP](https://camo.githubusercontent.com/037be6a8a2ad9df871eaa0fabddfd1424b05a622a7f18ff51188a175c5107718/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253545382e312d3737374242343f7374796c653d666c61742d737175617265266c6f676f3d706870)](https://php.net)[![License](https://camo.githubusercontent.com/3a863b296637029f7719a7ff4a8fa0261f2c9716ff498ca4a115c27fcc66270a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f657863656c6c652d696e7369676874732f77686174736170702e7376673f7374796c653d666c61742d737175617265)](LICENSE)

A PHP package for integrating with the **Meta WhatsApp Cloud API**. Handles OAuth authentication, WABA discovery, message templates, inbound/outbound messaging, webhooks, and HTTP request logging.

Features
--------

[](#features)

- **OAuth 2.0** — Meta Login for Business with long-lived token exchange and auto-refresh
- **WABA Discovery** — Auto-detect all WhatsApp Business Accounts the user can access
- **Business Profiles** — Link WABAs, fetch/update business profile data, sync phone numbers
- **Template Management** — Create, list, delete message templates; track approval via webhooks
- **Message Sending** — Text, template, and media messages
- **Webhook Processing** — Verify webhooks, receive inbound messages, handle status callbacks
- **HTTP Request Logging** — Every API call logged to `http_request_logs` table
- **PDO-based** — Uses MySQL via PDO (extensible to other databases)
- **Configurable Table Prefix** — All WhatsApp tables use the `WHATSAPP_TABLE_PREFIX` env var

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

[](#installation)

```
composer require excelle-insights/whatsapp
```

Environment Setup
-----------------

[](#environment-setup)

Create a `.env` file in your project root:

```
# Meta / WhatsApp Cloud API
WHATSAPP_GRAPH_API=https://graph.facebook.com
WHATSAPP_API_VERSION=v22.0
WHATSAPP_APP_ID=your_app_id
WHATSAPP_APP_SECRET=your_app_secret
WHATSAPP_REDIRECT_URI=https://your-app.com/auth-callback.php
WHATSAPP_TABLE_PREFIX=whatsapp
WHATSAPP_WEBHOOK_VERIFY_TOKEN=your_verify_token

# Database
DB_DSN=mysql:host=127.0.0.1;dbname=myapp
DB_USER=root
DB_PASSWORD=
```

Quick Start
-----------

[](#quick-start)

```
