itsmedudes/laravel-whatsapp
Production-ready Laravel client for WhatsApp Business via Meta Graph. Send messages with a fluent payload builder, support multi-tenant access tokens, automatic retries and logging, plus webhook signature verification. Includes publishable config and migrations.
Pros:
Cons:
sendMessage() could block requests; lacks queue/job integration out of the box.429 Too Many Requests, 400 Bad Request).sendMessage() calls meet throughput needs, or is async (queues) required?composer require itsmedudes/laravel-whatsapp
php artisan vendor:publish --tag=meta-config
php artisan vendor:publish --tag=meta-migrations
php artisan migrate
config/meta.php with:
app_id, app_secret (Meta Developer credentials).phone_number_id (WhatsApp Business number).verify_token (for webhook verification).default_from (sender phone number in E.164 format)./whatsapp/webhook).WhatsAppBusinessClient into services/controllers:
$client = app(WhatsAppBusinessClient::class)->forUser($userId);
$client->sendMessage($phoneNumberId, MessagePayloadBuilder::text($to, 'Hello!'));
$verifier = new WebhookVerifier();
if (!$verifier->verifySignature($request->getContent(), $request->header('X-Hub-Signature-256'))) {
abort(403);
}
// Process payload...
vendor:publish and service container usage). Test compatibility if using older versions.WhatsAppBusinessClient into user-facing flows (e.g., notifications, support).sendMessage() in try-catch).429 responses).config/meta.php simplify updates.config/meta.php:
'logging' => [
'enabled' => true,
'channel' => 'single',
],
retry helper or a package like spatie/laravel-circuitbreaker).sendMessage() dispatched as a job).| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Meta API Outage | No messages sent/received | Fallback to SMS/email; notify users. |
| Rate Limit Exceeded (`4 |
How can I help you explore Laravel packages today?