403 Error when attempting activities/addcontacts

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

Register for our "Making Sense of Online Marketing for Retail" Webinar

Join us on Thursday, August 13th at 2pm ET for a free webinar where we'll discuss how to incorporate online marketing into your retail store.

Read More
Featured