Download the PHP package activecampaign/api-php without Composer

On this page you can find all versions of the php package activecampaign/api-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package api-php

ActiveCampaign PHP API Wrapper

This is the official PHP wrapper for the ActiveCampaign API. The purpose of these files is to provide a simple interface to the ActiveCampaign API. You are not required to use these files (in order to use the ActiveCampaign API), but it's recommended for a few reasons:

  1. It's a lot easier to get set up and use (as opposed to coding everything from scratch on your own).
  2. It's fully supported by ActiveCampaign, meaning we fix any issues immediately, as well as continually improve the wrapper as the software changes and evolves.
  3. It's often the standard approach for demonstrating API requests when using ActiveCampaign support.

Both customers of our hosted platform and On-Site edition can use these files. On-Site customers should clone the source and switch to the "onsite" branch, as that is geared towards the On-Site edition. Many features of the hosted platform are not available in the On-Site edition.

Installation

You can install activecampaign-api-php by downloading (.zip) or cloning the source:

git clone [email protected]:ActiveCampaign/activecampaign-api-php.git

Composer

If you are using Composer, create your composer.json file (example here).

Then load the composer.phar file in that directory:

curl -sS https://getcomposer.org/installer | php

Next, run install to load the ActiveCampaign library:

php composer.phar install

You should then see the activecampaign folder inside vendor.

Read more about using Composer.

Example Usage

Composer

In your script just include the autoload.php file to load all classes:

require "vendor/autoload.php";

Next, create a class instance of ActiveCampaign:

$ac = new ActiveCampaign("API_URL", "API_KEY");

That's it!

includes/config.php

define("ACTIVECAMPAIGN_URL", "API_URL");
define("ACTIVECAMPAIGN_API_KEY", "API_KEY");

examples.php

require_once("includes/ActiveCampaign.class.php");

$ac = new ActiveCampaign(ACTIVECAMPAIGN_URL, ACTIVECAMPAIGN_API_KEY);

// Adjust the default cURL timeout
$ac->set_curl_timeout(10);

$account = $ac->api("account/view");

Or just include everything in the same PHP file:

define("ACTIVECAMPAIGN_URL", "API_URL");
define("ACTIVECAMPAIGN_API_KEY", "API_KEY");
require_once("includes/ActiveCampaign.class.php");
$ac = new ActiveCampaign(ACTIVECAMPAIGN_URL, ACTIVECAMPAIGN_API_KEY);

// Adjust the default cURL timeout
$ac->set_curl_timeout(10);

$account = $ac->api("account/view");

See our examples file for more in-depth samples.

Full Documentation

Click here to view our full API documentation.

Reporting Issues

We'd love to help if you have questions or problems. Report issues using the Github Issue Tracker or email [email protected].


All versions of api-php with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
ext-curl Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package activecampaign/api-php contains the following files

Loading the files please wait ....