ryuamy / whatsapp-qiscus-php
Qiscus Whatsapp API Third Party PHP Library
1.0.0
2021-07-22 09:58 UTC
Requires
- php: >=7.2.0
This package is auto-updated.
Last update: 2024-10-22 17:50:36 UTC
README
Qiscus Whatsapp API Third Party PHP Package.
Before you use the package, make sure you have a Qiscus Multichannel account by register in here. You also need WABA (WhatsApp Business Account) ID to create template.
Instalation
Install package with composer by following command:
composer require ryuamy/whatsapp-qiscus-php
Call Package
Add following code on your project:
use Ryuamy\WAQiscus;
Usages
WAQiscus\Class::function( $appId, ... );
Example
Authentication
Get Token
$bodyParameters = [ 'email' => '(Qiscus login email)', 'password' => '(Qiscus login password)', ]; $Whatsapp = WAQiscus\Authentication::getToken( '(Application ID)', $bodyParameters );
Sending Message
Template Message
Sending whatsapp chat with template. Make sure you have the template already on your Qiscus dashboard.
$bodyParameters = [ 'to' => '62812345678', 'type' => 'template', 'template' => [ 'namespace' => '(namespace template)', 'name' => 'template_testing', 'language' => [ 'policy' => 'deterministic', 'code' => 'en' ], 'components' => array() //header, body, and footer template variables ] ]; $Whatsapp = WAQiscus\Message::template( '(Application ID)', '(Token Auth)', '(Channel ID)', $bodyParameters );