PHP code example of inserve / cloud-factory-api-php
1. Go to this page and download the library: Download inserve/cloud-factory-api-php 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/ */
inserve / cloud-factory-api-php example snippets
use GuzzleHttp\Client;
use Inserve\CloudFactoryAPI\CloudFactoryAPIClient;
dk',
]);
$cloudFactory = new CloudFactoryAPIClient(
client: $guzzle,
);
$accessToken = $api->exchangeRefreshToken('refresh.token');
$cloudFactory->setAccessToken($accessToken);
if (! $cloudFactory->isAuthenticated()) {
return;
}
$customerList = $cloudFactory->getCustomers([
'PageSize' => 100
]);
foreach ($customerList->getResults() as $customer) {
echo $customer->getName() . PHP_EOL;
}