Skip to content

Laravel WhatsAppDual-backend WhatsApp integration for Laravel.

Meta Cloud API + whatsapp-web.js sidecar, behind a single facade, with a polished Livewire admin UI.

At a glance

php
use Kstmostofa\LaravelWhatsApp\Facades\WhatsApp;

// One-line send — auto-picks Cloud or Web by recipient shape
WhatsApp::send('+9665XXXXXXXX', 'Hello');                       // Cloud API
WhatsApp::send('966512345678@c.us', 'Hello via personal number'); // Web sidecar

// Cloud API templates
WhatsApp::messages()->sendTemplate('+9665XXXXXXXX', 'order_ready', 'en_US', [
    ['type' => 'body', 'parameters' => [['type' => 'text', 'text' => 'Munir']]],
]);

// Web sidecar — full personal-account access
WhatsApp::web('main')->groups()->create('Project X', ['9665XXXXXXXX@c.us']);
WhatsApp::web('main')->messages()->sendImage('966...@c.us', ['url' => '…', 'caption' => 'Hi']);

// Queue it
SendMessage::dispatch('+9665XXXXXXXX', 'Queued hi');

// React to inbound events
Event::listen(\Kstmostofa\LaravelWhatsApp\Events\Web\MessageReceived::class, function ($event) {
    Log::info($event->from() . ' said: ' . $event->body());
});

When to use which backend

FeatureCloud APIWeb sidecar
Personal number pairing
Group chats
Status / Stories
Free-form messages anytime❌ (templates outside 24 h window)
Approved business templates
Official Meta support, no ban risk
Scales to millions⚠️ session-bound
No extra runtime❌ (Node + Chromium)

Most apps use both — see getting started to install in 5 minutes.

Released under the MIT License.