We all started somewhere! Share your experience on the Get Advice: Let's Get Started Sweepstakes thread and be entered to win a $100 credit on your Constant Contact account.

curl authentification - which exactly is the username and password?

Talize
Participant

curl authentification - which exactly is the username and password?

I'm using the curl authentication and I get a 401 error

I tried accessing this url in the browser:

 

https://api.constantcontact.com/ws/customers/{USERNAME}/lists

 

where username is the same username I use to access the constantcontact interface. I get to a prompt where I reenter the username and password, and it rejects it.

 

From the code, using the sample cc_class.php library, I get a 401 error.

 

I've already generated the API key, and I'm really confused now about what I'm supposed to use for user/pwd since the API key generation doesn't give me anything else ...

2 REPLIES 2
DaveBerard
Moderator

If you're using Basic Authentication, which is sounds like you are trying to use, the format is:

 

username: {api_key}%{username}

password: {password}

 

Where {username} and {password} are the same as you would use through our website to log into your account.  You can find out more about our authentication models here: http://community.constantcontact.com/t5/Documentation/Authentication-Overview/ba-p/25981

Dave Berard
Senior Product Manager, Constant Contact
Talize
Participant

thanks, that worked

Developer Portal

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

Visit Page