The Community is hosting an End of Summer sweepstakes! Participants must complete tasks to earn tickets that will enter them with a chance to win a free year of Constant Contact and other great prizes!*
*No Purchase Necessary. For Official Rules, visit here. Constant Contact’s End of Summer 2020 Sweepstakes ends on October, 20, 2020 at 11:50 PM EST.

curl authentification - which exactly is the username and password?

Highlighted
Member

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
Highlighted
Moderator

Re: curl authentification - which exactly is the username and password?

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
Highlighted
Member

Re: curl authentification - which exactly is the username and password?

thanks, that worked

Developer Portal

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

Visit Page

Constant Contact 2020 End of Summer Community Sweepstakes!

The Constant Contact User Community is hosting a sweepstakes. The more you participate, the more chances you have to win! Read on to learn more...

Read More
Featured