The Community is hosting an End of Summer sweepstakes! Participants must complete tasks to earn tickets that will enter them with a chance to win a free year of Constant Contact and other great prizes!*
*No Purchase Necessary. For Official Rules, visit here. Constant Contact’s End of Summer 2020 Sweepstakes ends on October, 20, 2020 at 11:50 PM EST.

PHP CTCT API getting started

New Member

PHP CTCT API getting started

Using the example I am unable to authenticate.  I get the error:


OAuth Exception: Username <my user name> not found in datastore


the login name i use looks like this: (not actually my name)


I have generated an API Key, and have populated the PHP example with the Key and Secret as well as the user name as expected.  I seem to be unable to authenticate.


$username = ''; (changed for security)
$apiKey = 'I entered my API Key here';
$consumerSecret = 'I entered my api secret here';
$Datastore = new CTCTDataStore();
$DatastoreUser = $Datastore->lookupUser($username);


I was just hoping to add a form to a page where it would add a user... guess "easy" wasn't on the list of things this is associated with.


Any help would be apreciated.


Re: PHP CTCT API getting started



Would you be able to give us an outline of the application you're working on? It'll be easier to help you out, knowing exactly what you're building.

Nick Galbraith
Support Engineer
Developer Portal

View API documentation, code samples, get your API key.

Visit Page

Constant Contact 2020 End of Summer Community Sweepstakes!

The Constant Contact User Community is hosting a sweepstakes. The more you participate, the more chances you have to win! Read on to learn more...

Read More