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.

403 Error when attempting activities/addcontacts

SOLVED
Go to solution
Occasional Contributor

403 Error when attempting activities/addcontacts

Hi!

 

I get response 403:

 

{"error_key":"user.privilege.forbidden","error_message":"You don't have permission to perform this action; please see your account owner."}

using the API call:  

 

 

 https://api.constantcontact.com/v2/activities/addcontacts?api_key=<API_KEY>

According to documentation the request needs "contacts:write" privileges, which according to API's `account/user/privileges` the user has. The user can perform PUT on API's contacts/contactId succesfully. 

 

 

Is there something missing?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Moderator

Re: 403 Error when attempting activities/addcontacts

Hello,

 

Thank you for reaching out to the API Support team here at Constant Contact.

 

 

It looks like you are using PUT on our Bulk Import contact activity endpoint. This endpoint will only accept a POST call. Even if your import contains existing contacts, when using this method to import you need to POST to it rather than PUT.

 

See here for more details: https://developer.constantcontact.com/docs/bulk_activities_api/bulk-activities-import-contacts.html

 

Please let me know if you have any other questions!

 

Sincerely,

David B.

API Support Specialist

View solution in original post

2 REPLIES 2
Highlighted
Moderator

Re: 403 Error when attempting activities/addcontacts

Hello,

 

Thank you for reaching out to the API Support team here at Constant Contact.

 

 

It looks like you are using PUT on our Bulk Import contact activity endpoint. This endpoint will only accept a POST call. Even if your import contains existing contacts, when using this method to import you need to POST to it rather than PUT.

 

See here for more details: https://developer.constantcontact.com/docs/bulk_activities_api/bulk-activities-import-contacts.html

 

Please let me know if you have any other questions!

 

Sincerely,

David B.

API Support Specialist

View solution in original post

Highlighted
Occasional Contributor

Re: 403 Error when attempting activities/addcontacts

Thanks David, even though there was no code example you nailed the issue. It was indeed a PUT request (the perks of copy-pasting).

 

Thanks!

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