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.

Having Trouble with the adding contacts using the Activities Collection

Highlighted
New Member

Having Trouble with the adding contacts using the Activities Collection

I seem to have most everything else working, but am having issues with bulk adding contacts. I may be totally off-track here, but here's what I'm doing:

POSTing to:

http://api.constantcontact.com/ws/customers/{username}/activities?oauth_consumer_key={key}&oauth_nonce={nonce}&oauth_signature=nXMGKNRDbK%2FfbmMtSwo2t8dR1M8%3D&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1239268102&oauth_token={token}&oauth_version=1.0

With a header a Content-Type header:
application/x-www-form-urlencoded

And the BODY as (from the example - all on one line):
activityType=ADD_CONTACTS&data=Email+Address%2CFirst+Name%2CLast+Name%0D%0Awstest3%40example.com%2C+Fred%2C+Test%0D%0Awstest4%40example.com%2C+Joan%2C+Test%0D%0Awstest5%40example.com%2C+Ann%2C+Test&lists=http%3A%2F%2Fapi.constantcontact.com%2Fws%2Fcustomers%2F{username}%2Flists%2F2&lists=http%3A%2F%2Fapi.constantcontact.com%2Fws%2Fcustomers%2F{username}%2Flists%2F3

Am I totally off base? Missed a tiny little thing?

Thanks!
.j
makes things.
3 REPLIES 3
Highlighted
Moderator

RE: Having Trouble with the adding contacts using the Activities

Hi Jonah,

It looks like you're attempting to use the OAuth method for authentication. You're one of the first customers to get this up and running and it would be useful to find out a couple of things to help you.

1. What language are you coding this in?
2. What OAuth library or open source project did you use for the OAuth implementation?
3. Are you receiving an error code when you POST this activity (401, 409, 415, other)?
Dave Berard
Senior Product Manager, Constant Contact
Highlighted
New Member

RE: Having Trouble with the adding contacts using the Activities

Hello,

Thanks for getting back to me on this. To your questions:

1) ColdFusion 8
2) This Lib: http://code.google.com/p/oauth/ plus some wrappers I wrote to simplify things.
3) I'm getting response: Error 401: Error reported: 401 Unauthorized

Like I said, the other actions seem to be working just fine.

Thanks!
.jonah
makes things.
Highlighted
Developer

re: 401 Errors with the Activities Resource and OAuth

Hello Jonah,

Due to a security vulnerability acknowledged by the OAuth community, Constant Contact is retracting support for OAuth Authentication. API adopters should adopt Basic Authentication over HTTPs.



You can read more on the Basic Authentication model here.



We acknowledge and apologize for the impact this could have on developers currently building applications. We believe this action is in the best interests of our Constant Contact account holders and in the best interest of our API adopters (It appears likely that the security vulnerability will require coding changes on the part of both Constant Contact and any OAuth adopters. Since our OAuth implementation is quite new, few OAuth based implementations have been deployed - and hence it is our hope and belief that changing models now is the most expedient - and secure - approach).



If you are interested in more information on the nature of the OAuth security vulnerability, please see the OAuth security advisory, here.


Thanks,
Tom M
Group Product Manager – Content Editing
Constant Contact
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