2017 © Pedro Peláez
 

library api-php

Official PHP wrapper for the ActiveCampaign API.

image

activecampaign/api-php

Official PHP wrapper for the ActiveCampaign API.

  • Wednesday, April 26, 2017
  • by activecampaign
  • Repository
  • 37 Watchers
  • 69 Stars
  • 151,347 Installations
  • PHP
  • 6 Dependents
  • 0 Suggesters
  • 50 Forks
  • 2 Open issues
  • 18 Versions
  • 16 % Grown

The README.md

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)

  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., (*2)

Installation

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

git clone git@github.com:ActiveCampaign/activecampaign-api-php.git, (*4)

Composer

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

Then load the composer.phar file in that directory:, (*6)

curl -sS https://getcomposer.org/installer | php, (*7)

Next, run install to load the ActiveCampaign library:, (*8)

php composer.phar install, (*9)

You should then see the activecampaign folder inside vendor., (*10)

Read more about using Composer., (*11)

Example Usage

Composer

In your script just include the autoload.php file to load all classes:, (*12)

require "vendor/autoload.php";, (*13)

Next, create a class instance of ActiveCampaign:, (*14)

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

That's it!, (*16)

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:, (*17)

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., (*18)

Full Documentation

Click here to view our full API documentation., (*19)

Reporting Issues

We'd love to help if you have questions or problems. Report issues using the Github Issue Tracker or email help@activecampaign.com., (*20)

The Versions

26/04 2017

dev-master

9999999-dev https://github.com/ActiveCampaign/activecampaign-api-php

Official PHP wrapper for the ActiveCampaign API.

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

newsletter forms automation subscribe emails activecampaign email-marketing marketing-automation

26/04 2017

v2.0.2

2.0.2.0 https://github.com/ActiveCampaign/activecampaign-api-php

Official PHP wrapper for the ActiveCampaign API.

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • lib-curl *

 

newsletter forms automation subscribe emails activecampaign email-marketing marketing-automation

26/04 2017

dev-develop

dev-develop https://github.com/ActiveCampaign/activecampaign-api-php

Official PHP wrapper for the ActiveCampaign API.

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

newsletter forms automation subscribe emails activecampaign email-marketing marketing-automation

26/04 2017

v2.0.3

2.0.3.0 https://github.com/ActiveCampaign/activecampaign-api-php

Official PHP wrapper for the ActiveCampaign API.

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

newsletter forms automation subscribe emails activecampaign email-marketing marketing-automation

26/04 2017

dev-feature/improvements

dev-feature/improvements https://github.com/ActiveCampaign/activecampaign-api-php

Official PHP wrapper for the ActiveCampaign API.

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

newsletter forms automation subscribe emails activecampaign email-marketing marketing-automation

08/09 2016

v1.3.0

1.3.0.0 https://github.com/ActiveCampaign/activecampaign-api-php

Official PHP wrapper for the ActiveCampaign API.

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • lib-curl *

 

newsletter forms automation subscribe emails activecampaign email-marketing marketing-automation

08/09 2016

v1.3.1

1.3.1.0 https://github.com/ActiveCampaign/activecampaign-api-php

Official PHP wrapper for the ActiveCampaign API.

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • lib-curl *

 

newsletter forms automation subscribe emails activecampaign email-marketing marketing-automation

08/09 2016

v1.3.2

1.3.2.0 https://github.com/ActiveCampaign/activecampaign-api-php

Official PHP wrapper for the ActiveCampaign API.

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • lib-curl *

 

newsletter forms automation subscribe emails activecampaign email-marketing marketing-automation

08/09 2016

v2.0.0

2.0.0.0 https://github.com/ActiveCampaign/activecampaign-api-php

Official PHP wrapper for the ActiveCampaign API.

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • lib-curl *

 

newsletter forms automation subscribe emails activecampaign email-marketing marketing-automation

08/09 2016

v2.0.1

2.0.1.0 https://github.com/ActiveCampaign/activecampaign-api-php

Official PHP wrapper for the ActiveCampaign API.

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • lib-curl *

 

newsletter forms automation subscribe emails activecampaign email-marketing marketing-automation

19/08 2016

v1.2.0

1.2.0.0 https://github.com/ActiveCampaign/activecampaign-api-php

Official PHP wrapper for the ActiveCampaign API.

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • lib-curl *

 

newsletter forms automation subscribe emails activecampaign email-marketing marketing-automation

26/08 2014

dev-mthommes-forms_ajax_class

dev-mthommes-forms_ajax_class https://github.com/ActiveCampaign/activecampaign-api-php

Official PHP wrapper for the ActiveCampaign API.

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • lib-curl *

 

newsletter forms automation subscribe emails activecampaign email-marketing marketing-automation

26/08 2014

dev-mthommes-lists_unsubscribe

dev-mthommes-lists_unsubscribe https://github.com/ActiveCampaign/activecampaign-api-php

Official PHP wrapper for the ActiveCampaign API.

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • lib-curl *

 

newsletter forms automation subscribe emails activecampaign email-marketing marketing-automation

26/08 2014

dev-mthommes-wordpress_issues

dev-mthommes-wordpress_issues https://github.com/ActiveCampaign/activecampaign-api-php

Official PHP wrapper for the ActiveCampaign API.

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • lib-curl *

 

newsletter forms automation subscribe emails activecampaign email-marketing marketing-automation

26/08 2014

v1.1.0

1.1.0.0 https://github.com/ActiveCampaign/activecampaign-api-php

Official PHP wrapper for the ActiveCampaign API.

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • lib-curl *

 

newsletter forms automation subscribe emails activecampaign email-marketing marketing-automation

27/05 2014

dev-feature-composer

dev-feature-composer https://github.com/ActiveCampaign/activecampaign-api-php

Official PHP wrapper for the ActiveCampaign API.

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • lib-curl *

 

newsletter forms automation subscribe emails activecampaign email-marketing marketing-automation

27/05 2014

dev-feature-deals

dev-feature-deals https://github.com/ActiveCampaign/activecampaign-api-php

Official PHP wrapper for the ActiveCampaign API.

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • lib-curl *

 

newsletter forms automation subscribe emails activecampaign email-marketing marketing-automation

27/05 2014

v1.0.0

1.0.0.0 https://github.com/ActiveCampaign/activecampaign-api-php

Official PHP wrapper for the ActiveCampaign API.

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • lib-curl *

 

newsletter forms automation subscribe emails activecampaign email-marketing marketing-automation