1. Go to this page and download the library: Download voicetel/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/ */
voicetel / sdk example snippets
oiceTel\Sdk\Client;
$client = new Client();
// Exchange username + password for an API key (one-time per session)
$client->login(1000000001, 'hunter2');
// Typed responses — arrays with documented shapes.
$me = $client->account->get();
printf("Balance: \$%.2f | Caller ID: %s\n", $me['cash'], $me['callerId']);
// List your numbers
$list = $client->numbers->list();
foreach ($list['numbers'] as $n) {
printf(
"%s route=%d cnam=%s sms=%s\n",
$n['number'],
$n['route'],
$n['cnam'] ? 'yes' : 'no',
$n['smsEnabled'] ? 'yes' : 'no',
);
}