hyperzod / whatsapp-marketing-sdk-php
A PHP SDK to integrate Whatsapp Marketing with your application.
v1.5
2025-03-17 12:35 UTC
Requires
- php: ^8.0
- guzzlehttp/guzzle: ^7.5
Requires (Dev)
- phpunit/phpunit: ^9.0
README
This is the official PHP SDK for Whatsapp Marketing.
Installation
You can install the package via composer:
composer require hyperzod/whatsapp-marketing-sdk-php
Usage
You can use the sdk to call the Whatsapp Marketing API (Eg: Sending a message).
// $client = WhatsappMarketingClient($api_key, $env, $token = null); // $response = $client->message->sendUtilityMessage($payload);
// Creating data objects $messageData = new UtilityMessageData( 'tenant123', 'template_abc', 'TEXT', 919876543210, ['1' => 'A1005', '2' => 'Accepted'] ); // Or from request data $messageData = UtilityMessageData::fromArray($request->all()); // Using with services $messageService->sendUtilityMessage($messageData->toArray());
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
License
The MIT License (MIT). Please see License File for more information.