PHP code example of frankkessler / incontact-laravel-oauth2-rest
1. Go to this page and download the library: Download frankkessler/incontact-laravel-oauth2-rest 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/ */
frankkessler / incontact-laravel-oauth2-rest example snippets
Frankkessler\Incontact\Providers\IncontactLaravelServiceProvider::class,
'Incontact' => Frankkessler\Incontact\Facades\Incontact::class,
'incontact.logger' => $class_or_class_name
INCONTACT_OAUTH_DOMAIN=api.incontact.com
INCONTACT_OAUTH_CONSUMER_TOKEN=[APPLICATION_NAME]@[VENDOR_NAME]
INCONTACT_OAUTH_CONSUMER_SECRET=BUSINESS_UNIT_NUMBER
INCONTACT_OAUTH_SCOPES=RealTimeApi AdminApi ReportingApi
INCONTACT_OAUTH_USERNAME=YOUR_INCONTACT_USERNAME
INCONTACT_OAUTH_PASSWORD=YOUR_INCONTACT_PASSWORD
$incontact = new \Frankkessler\Incontact\Incontact();
$result = $incontact->AdminApi()->agents();
foreach($result['agents'] as $record) {
$agentId = $record['AgentId'];
}
$incontact = new \Frankkessler\Incontact\Incontact();
$result = $incontact->ReportingApi()->contact('9999999999');
foreach($result as $record) {
$contactId = $record['contactId'];
}
bash
php artisan vendor:publish
bash
php artisan migrate