1. Go to this page and download the library: Download idapgroup/viber-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/ */
idapgroup / viber-sdk example snippets
dapGroup\ViberSdk\Config;
use IdapGroup\ViberSdk\Client;
use IdapGroup\ViberSdk\Api;
use IdapGroup\ViberSdk\Sms;
use IdapGroup\ViberSdk\Viber;
use IdapGroup\ViberSdk\Parameter;
$sms = new Sms();
$viber = new Viber();
$parameter = new Parameter();
$config = new Config();
$client = new Client(['login' => 'Your login', 'password' => 'Your password']);
// Instantiate an Api client.
$api = new Api($config, $client);