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?


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:




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 ...


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

thanks, that worked

Developer Portal

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

Visit Page