wapluginlab/php-lib

There is no license information available for the latest version (dev-master) of this package.

WAPLUGIN PHP library

dev-master / 1.0.x-dev 2019-12-17 13:06 UTC

This package is auto-updated.

Last update: 2024-05-17 23:01:29 UTC


README

Installation

composer require wapluginlab/php-lib

Account

Get Account

use Waplugin\Config;
use Waplugin\Account;

$params['page'] = 1;

Config::$secretKey = getenv('SECRET_KEY');

$result = Account::index($params);

return $result;

View Account Detail

use Waplugin\Config;
use Waplugin\Account;

$account_id = 1;

Config::$secretKey = getenv('SECRET_KEY');

$result = Account::show($account_id);

return $result;

WhatsApp

Status

use Waplugin\Config;
use Waplugin\Wa;

$account_id = 1;

Config::$secretKey = getenv('SECRET_KEY');

$result = Wa::status($account_id);

return $result;

Send Message

use Waplugin\Config;
use Waplugin\Wa;

$account_id = 1;

$params['phone'] = '6281xxxxxx';
$params['msg'] = 'Lorem Ipsum Dolar Sit Maet';

Config::$secretKey = getenv('SECRET_KEY');

$result = Wa::send($account_id, $params);

return $result;

Official API Docs