I am trying to write a script that will call the CTCT API to see if an email already exists in our contacts. For some reason, my username and/or my developer key aren't working -- how do I go about fixing this?
//HERE'S WHERE THE DECLARATION OF VARIABLES WOULD BE.
$ConstantContact = new ConstantContact('oauth2', $cc_api_key, $cc_username, $cc_api_secret);
//Just trying to grab a list of the contactlists for now to make sure I can authenticate
$Contacts = $ConstantContact->getContacts();
Any help would be appreciated.
Based on the code and error message you have posted, it appears that you are working with the V1 API wrapper, but are using a V2 API key. Unfortunately these two systems each have unique keys that cannot be used interchangeably.
If you generate a new V1 API key, you should be able to use your code immediately. You can create an API key for use with V1 API here : http://community.constantcontact.com/t5/Documentation/API-Keys/ba-p/25015
If you do experience any further difficulties, please reply to this post and I will be happy to assist you!
Tier 2 Support