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. [API Development](/categories/api)
4. /
5. classy-org/constantcontact-php-client

ActiveLibrary[API Development](/categories/api)

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 2w ago

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 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 50% 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

2981d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/885331?v=4)[sholman](/maintainers/sholman)[@sholman](https://github.com/sholman)

---

Top Contributors

[![s-holman](https://avatars.githubusercontent.com/u/12986694?v=4)](https://github.com/s-holman "s-holman (1 commits)")[![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

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.2M46](/packages/tencentcloud-tencentcloud-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k496.1k33](/packages/neuron-core-neuron-ai)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

528.3M7](/packages/avalara-avataxclient)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

252.5k](/packages/eslazarev-wildberries-sdk)[files.com/files-php-sdk

Files.com PHP SDK

2478.1k](/packages/filescom-files-php-sdk)[aimeos/prisma

A powerful PHP package for integrating media related Large Language Models (LLMs) into your applications

1942.4k4](/packages/aimeos-prisma)

PHPackages © 2026

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