PHP code example of mike-rollout / hbtest-php-client

1. Go to this page and download the library: Download mike-rollout/hbtest-php-client 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/ */

    

mike-rollout / hbtest-php-client example snippets





 Configure OAuth2 access token for authorization: oauth2
$config = Rollout\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Configure API key authorization: private_apps
$config = Rollout\Client\Configuration::getDefaultConfiguration()->setApiKey('private-app', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Rollout\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('private-app', 'Bearer');


$apiInstance = new Rollout\Client\Api\BasicApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$contact_id = 'contact_id_example'; // string

try {
    $apiInstance->deleteCrmV3ObjectsContactsContactIdArchive($contact_id);
} catch (Exception $e) {
    echo 'Exception when calling BasicApi->deleteCrmV3ObjectsContactsContactIdArchive: ', $e->getMessage(), PHP_EOL;
}