bariew / whatsapp
Whatsapp API
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:api
Requires
- ext-fileinfo: *
- ext-json: *
- ext-zip: *
- guzzlehttp/guzzle: *
This package is not auto-updated.
Last update: 2025-08-29 12:31:35 UTC
README
Whatsapp API client.
Description
- send messages
- create templates
- receive media
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist bariew/whatsapp
or add
"bariew/whatsapp": "dev-master"
to the require section of your composer.json
file.
Usage
$whatsapp = Api::instance($id, $token, $business_id);
$templateId = $whatsapp->templateCreate("template1_en", "Hello {{username}}", "", "From My App", [
"https://my.url" => "click this url",
"my_key" => "Ok"
], 'en');
$messageId = $whatsapp->templateMessage('+9-900-033-44-16', 'template1_en', ['username' => "Paul"])['messages'][0]['id'];
see more examples in Api::webhookProcess()
since most actions happen when user answers to our messages and we need to process the answer in our webhook