Between 9pm - 11pm ET this Sat (9/18), we will be doing routine network maintenance. Please avoid usage of our API during this time frame - including any scheduled sync jobs. Thank you in advance for your patience.

403 Error when attempting activities/addcontacts

SOLVED
Go to solution
MarkB8
Occasional Participant

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

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

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

MarkB8
Occasional Participant

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