PHP CTCT API getting started

Participant

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: login.name.full (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.

 

include_once('include/ConstantContact.php');
$username = 'user.name.full'; (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.

1 REPLY 1
Moderator

Hey,

 

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