1. Go to this page and download the library: Download xdubois/activecampaign-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/ */
xdubois / activecampaign-api example snippets
use xdubois\ActiveCampaign\ActiveCampaignAPI;
$api = new ActiveCampaignAPI('your-api-token', 'https://yourapp.api-us1.com');
use xdubois\ActiveCampaign\ActiveCampaignAPI;
use xdubois\ActiveCampaign\Configuration;
$config = new Configuration(
'your-api-token',
'https://yourapp.api-us1.com',
timeout: 60, // Request timeout in seconds
connectTimeout: 10, // Connection timeout in seconds
maxRetries: 3, // Number of retry attempts
retryDelay: 1.0 // Delay between retries in seconds
);
$api = new ActiveCampaignAPI($config);