First time using Constant Contact API

Occasional Participant

First time using Constant Contact API

This is the first time I have used the Constant Contact API. I am working with Coldfusion to build me application. In the application.cfc file, I am asked for a username and password and APIkey. I got the APIkey in the email when I signed up. I don't know which userid and password to use. I have a Constant Contact account that I used for sending our emails, it has about 1500 contacts and 7 lists.  I am trying to use that user name and password as I assume that should connect me to the proper CC account. When I tried my first page, I got a 401 not authorized error. Am I doing something wrong?

4 REPLIES 4
Employee

Hi,

 

The coldfusion wrapper is written to use the V1 API (heads up, the V1 API now has a limited shelf life).  That means you need a V1 API Key to use that wrapper--you can read about and generate a V1 API Key on this page.

 

That is the most likley reason for the 401 error if you are sure you input the right username and password.  We don't have a V2 Coldfusion wrapper, but you could use any of the V2 libraries listed on this page if you want to extend the life of your integration.

 

Best Regards,

Shannon W.

API Support Specialist

Occasional Participant

Thank you - when I made the new API key I was able to get the API to work for me.

 

Bo

Occasional Participant

I am now able to retrieve the first 50 records using the coldfusion templates.  At the end of the 50 records is a link to the next set of records?  When I try to go to that link, I am asked for a user name and password, after I enter my CC credentials, the credentials are refused.  How do I get more tahn just 50 records to be returned?

Hi,

 

Ideally, your program would programmatically pass the next link into the method and run the method again, until no next link is returned to get all results.  I'm not sure if the coldfusion wrapper has that functionality built into it, however.

 

If you want to retrieve the results manually by entering your credentials on that page, enter apiKey%username instead of your username (with your api key value & username filled in).  Enter your password normally.

 

Best Regards,

Shannon W.

API Support Specialist

Developer Portal

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

Visit Page