PHP code example of samiaraboglu / alotech-php-api

1. Go to this page and download the library: Download samiaraboglu/alotech-php-api 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/ */

    

samiaraboglu / alotech-php-api example snippets


$authentication = new AloTech\Authentication();
$authentication->setUsername('{USER_NAME}');
$authentication->setAppToken('{APP_TOKEN}');

$aloTech = new AloTech\AloTech($authentication);

$response = $aloTech->ping();

$aloTech->login('{EMAIL}');

$click2 = new AloTech\Click2($aloTech);

$click2->call([
    'phonenumber' => '{PHONE_NUMBER}',
    'hangup_url' => '{YOUR_HANGUP_URL}'
]);

$click2->hang();

$click2->hold();

$click2->unhold();

$report = new AloTech\Report($aloTech);

$report->agentPerf([
    'startdate'     => '{Y-m-d}',           // Optional
    'finishdate'    => '{Y-m-d}',           // Optional
    'agent'         => '{AGENT}',           // Optional
    'email'         => '{EMAIL}',           // Optional
    'agentcustomid' => '{AGENTCUSTOMID}',   // Optional
    'team'          => '{TEAM}',            // Optional
]);

$ composer