PHPackages                             classy-org/constantcontact-php-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. classy-org/constantcontact-php-client

ActiveLibrary

classy-org/constantcontact-php-client
=====================================

Wrapper around Guzzle Http Client to interact with Constant Contact APIv2

1.1.0(8y ago)124.7k1PHP

Since Apr 26Pushed 8y ago4 watchersCompare

[ Source](https://github.com/classy-org/constantcontact-php-client)[ Packagist](https://packagist.org/packages/classy-org/constantcontact-php-client)[ RSS](/packages/classy-org-constantcontact-php-client/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (4)Versions (4)Used By (0)

ConstantContact PHP Client [![Build Status](https://camo.githubusercontent.com/ea347c59674fdc695dcf33136dd1fadaa143f4e4635125b6984a37b2050e684a/68747470733a2f2f7472617669732d63692e6f72672f636c617373792d6f72672f636f6e7374616e74636f6e746163742d7068702d636c69656e742e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/classy-org/constantcontact-php-client)
=========================================================================================================================================================================================================================================================================================================================================================================

[](#constantcontact-php-client-)

Wrapper around Guzzle Http Client to interact with Constant Contact APIv2

Installation
------------

[](#installation)

The ConstantContact API php client can be installed with [Composer](https://getcomposer.org/):

```
composer require classy-org/constantcontact-php-client
```

Be sure you included composer autoloader in your app:

```
require_once '/path/to/your/project/vendor/autoload.php';
```

Usage
-----

[](#usage)

```
// Instantiate the client
$client = new \Classy\ConstantContactClient('API-KEY', 'ACCESS-TOKEN');

// Make a request.
$httpResponse = $client->request('GET', 'contacts');
$contacts = json_decode($httpResponse->getBody()->getContents());

//Or Grab Data Quickly.
$contacts = $client->getData('contacts');

//Store a Contact Quickly.
$payload = [
    'lists' => [
        [
            'id' => (string)1
        ]
    ],
    'email_addresses' => [
        [
            'email_address' => (string)'person@constantcontact.com'
        ]
    ],
    'first_name' => (string)'My',
    'last_name'  => (string)'Name',
];
$contacts = $client->addContact($payload);
```

Exception handling
------------------

[](#exception-handling)

This client is using Guzzle Http client. Exceptions are thrown when the Http response is not a 200 (OK) one:

```
try {
    $response = $client->request('POST', 'path/to/route', ['body' => ['check' => 1]]);
} catch (Exception $e) {
    if ($e instanceof \GuzzleHttp\Exception\ConnectException) {
        // there was a networking error
    }

    if ($e instanceof \GuzzleHttp\Exception\ClientException) {
        // Mailchimp API returned a 4xx response.
        $httpStatusCode = $e->getCode();
        if ($httpStatusCode == 404) {
            // resource doesn't exist
        }
        if ($httpStatusCode == 401) {
            // you're unauthorized (api key must be invalid)
        }
        if ($httpStatusCode == 403) {
            // you're not allowed to request this endpoint
        }
        if ($httpStatusCode == 400) {
            // body payload is invalid
        }
        if (...) {
            //
        }

        $bodyResponse = $e->getResponse()->getBody()->getContents();
    }

    if ($e instanceof \GuzzleHttp\Exception\ServerException) {
        // ConstantContact returned a 5xx response, which means they experience technical difficulties.
    }
}
```

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

3

Last Release

2933d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/cffb86ab7345f016843ed7832e31c3ce49762b79b9046e893c1147fa6bedc037?d=identicon)[sholman](/maintainers/sholman)

---

Top Contributors

[![steviehol](https://avatars.githubusercontent.com/u/12986694?v=4)](https://github.com/steviehol "steviehol (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/classy-org-constantcontact-php-client/health.svg)

```
[![Health](https://phpackages.com/badges/classy-org-constantcontact-php-client/health.svg)](https://phpackages.com/packages/classy-org-constantcontact-php-client)
```

###  Alternatives

[neuron-core/neuron-ai

The PHP Agentic Framework.

1.8k245.3k21](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
