Via composer
$ composer require samiaraboglu/alotech-php-api
$authentication = new AloTech\Authentication();
$authentication->setUsername('{USER_NAME}');
$authentication->setAppToken('{APP_TOKEN}');
$aloTech = new AloTech\AloTech($authentication);Test method to check API status and connectivity.
$response = $aloTech->ping();Set user session key.
$aloTech->login('{EMAIL}');Use click2 service.
$click2 = new AloTech\Click2($aloTech);Used to trigger a call to given number.
$click2->call([
'phonenumber' => '{PHONE_NUMBER}',
'hangup_url' => '{YOUR_HANGUP_URL}'
]);Hangs up the active call of the agent.
$click2->hang();Holds the active call of the agent.
$click2->hold();Unholds the active call of the agent.
$click2->unhold();Use report service.
$report = new AloTech\Report($aloTech);Returns agent performance information for the given period.
$report->agentPerf([
'startdate' => '{Y-m-d}', // Optional
'finishdate' => '{Y-m-d}', // Optional
'agent' => '{AGENT}', // Optional
'email' => '{EMAIL}', // Optional
'agentcustomid' => '{AGENTCUSTOMID}', // Optional
'team' => '{TEAM}', // Optional
]);