PHP code example of purelines / whapi-sdk
1. Go to this page and download the library: Download purelines/whapi-sdk library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
purelines / whapi-sdk example snippets
urelines\WhapiSdk\Api\MessagesApi;
use Purelines\WhapiSdk\ApiException;
use Purelines\WhapiSdk\Configuration;
use Purelines\WhapiSdk\Model\SenderText;
$config = Configuration::getDefaultConfiguration()
// Set your API token (copy it from Whapi panel, channel page):
->setAccessToken('YOUR_TOKEN')
// Use string format for boolean query parameters (tch (ApiException|InvalidArgumentException $e) {
echo 'API error: ', $e->getMessage();
}