Got a 'How do I' question? Join our live 'Ask a Trainer' session happening now for instant help and pro tips!

Can't schedule campaign via custom Zapier action

Ansel
Rookie
0 Votes
I'm using Zapier Custom Actions (https://help.zapier.com/hc/en-us/articles/16277139110157-Create-a-Custom-Action) to make Constant Contact API requests via Zaps. I'm trying to create a Zap which creates and sends an email campaign. I can create a campaign, get the campaign activity details, update the campaign activity with a contact list. That all works, but when I try to schedule the campaign, I get "{"error_key":"access_denied","error_message":" Request forbidden due to insufficient authorization scopes. Request forbidden due to insufficient user privileges."}" Am I doing something wrong here? Or is there no way to automate this via Zapier?
6 REPLIES 6
John__B
Moderator
0 Votes

Hello Ansel,

 

Thank you for reaching out to Constant Contact API Developer Support. My team is here to assist outside software developers with questions about building into Constant Contact's API.

 

The error response that you encountered would typically indicate that either the user role that you authorized the integration on your account with (Account Owner, Account Manager, Campaign Creator) didn’t have user privileges to perform an email campaign scheduling action (In this case, only the Campaign Creator role doesn’t have the privileges to send campaigns) or the integration didn’t include the necessary scopes in its authorization request to perform the action ( In this case it would be the “campaign:send” scope) Below I’m including our documentation on both of these areas.

 

User Roles and Privileges Overview:

 https://developer.constantcontact.com/api_guide/user_privileges.html

 

Authorization Scopes Overview:

https://developer.constantcontact.com/api_guide/scopes.html

 

 If you authorized the integration with a user role that has the privileges to send campaigns, then it is likely due to insufficient scopes and I would recommend reaching out to Zapier support to see if the necessary scope can be added to the integration. 

 

Please note that Zapier is a 3rd party product and not built or supported by Constant Contact, so we are limited in the support we can provide, but will try to answer any questions to the best of our ability as they pertain to Constant Contact’s API endpoints and functionality. 

 

Please have a look and let us know if you have any other questions!

 

Regards,


John B.
API Support Specialist
Did I answer your question? If so, please mark my post as an "Accepted Solution" by clicking the Accept as Solution button in the bottom right hand corner of this post.
Ansel
Rookie
0 Votes

Thanks John,

 

When using the Constant Contact integration in Zapier, there is no option to select a role with authenticating. You just log into your Constant Contact account and it's done.

 

I reached out to Zapier and they said to contact Constant Contact...

Ansel
Rookie
0 Votes

On my account page it shows that Zapier is connected with the following scopes but there's not way to edit those scopes from either end 

Ansel_0-1706540750906.png

 

John__B
Moderator
0 Votes

Hello Ansel,

 

Thank you for your reply. I apologize for the delay in our response.

 

Upon further investigation, we found that the error you’re encountering when attempting to create a new campaign schedule is not actually due to insufficient authorization scopes or user privileges but that there is no campaign activity ID provided in the requests. The scheduling request should be formatted as follows:

 

https://api.cc.email/v3/emails/activities/{campaign_activity_id}/schedules

 

The Zapier custom action requests to this endpoint have been formatted as follows:

 

https://api.cc.email/v3/emails/activities//schedules

 

In order for the requests to be successful, a campaign_activity_id must be included. Below I’m including our documentation on this request.

 

POST (Create) an Email Campaign Activity Schedule:

https://developer.constantcontact.com/api_reference/index.html#!/Email_Scheduling/scheduleEmailCampa...

 

Please have a look and let us know if you have any other questions!

 

Regards,


John B.
API Support Specialist
Did I answer your question? If so, please mark my post as an "Accepted Solution" by clicking the Accept as Solution button in the bottom right hand corner of this post.
Ansel
Rookie
0 Votes

Thank you so much! We're closer. After fixing that issue I'm getting error 415

 

request
request
Request Method
method
POST
Request Querystring
querystring
Request Querystring Scope
scope
campaign_data
Request Headers
headers
Request Headers Scope
scope
campaign_data
Request Body
body
{ "scheduled_date": "0" }
data
data
Request Data Scheduled Date
scheduled_date
0
response
response
Response Status
status
415
Response Headers
headers
Response Headers Access Control Allow Headers
access-control-allow-headers
Content-Type,X-Amz-Date,Authorization,X-Api-Key
Response Headers Access Control Allow Methods
access-control-allow-methods
GET,POST,PUT,DELETE,PATCH,OPTIONS
Response Headers Access Control Allow Origin
access-control-allow-origin
*
Response Headers Connection
connection
close
Response Headers Content Length
content-length
114
Response Headers Content Type
content-type
application/json
Response Headers Date
date
Sat, 24 Feb 2024 15:02:40 GMT
Response Headers Via
via
1.1 9e18259ccc98f7a9dcd0fe17b60688c2.cloudfront.net (CloudFront)
Response Headers X Amz Apigw ID
x-amz-apigw-id
TpW6oEkRIAMEKrQ=
Response Headers X Amz Cf ID
x-amz-cf-id
sUVm3ajPGNv5_zMrWrL7fcwWqamO0fbV9L4pOxMzVLFKojXAMpjvXw==
Response Headers X Amz Cf Pop
x-amz-cf-pop
IAD66-C1
Response Headers X Amzn Requestid
x-amzn-requestid
26865e1e-1cf9-4b8e-a6d8-d710abc56c44
Response Headers X Amzn Trace ID
x-amzn-trace-id
Root=1-65da0510-741906c376fa61283c096c5a;Parent=33df6fddaf94aa88;Sampled=0;lineage=9bc4f36a:0|366762dd:0
Response Headers X Cache
x-cache
Error from cloudfront
Response Headers X Eig Tracking ID
x-eig-tracking-id
99e57eb9-3802-4a3f-a3d4-437da8c97877
Response Body
body
[{"error_key":"http.status.unsupported_media_type","error_message":"The provided Content-Type is not supported."}]
data
data
1
1
error_key
error_key
http.status.unsupported_media_type
error_message
error_message
The provided Content-Type is not supported.
Courtney_E
Moderator
0 Votes

Hello Ansel,

 

Thank you for reaching out to Constant Contact API Developer Support. My team is here to assist outside software developers with questions about building into Constant Contact's API.

 

Response code 415 indicates that the Content-Type header is either missing or is not set to "application/json" within your request.

 

Response Codes - 415: Unsupported Media Type

https://v3.developer.constantcontact.com/api_guide/glossary_responses.html#415-unsupported-media-typ...

 

If you are unable to resolve this, could you please provide us with the full request(s) where you are receiving the error response (including URL, headers, timestamp, and request body), so that we can better assist you in identifying the root cause of the issue?

 

You can reach our team directly/securely via email at webservices@constantcontact.com and reference case 31988694.

 

Please have a look and let us know if you have any other questions!

 


Regards,

Courtney E.
Tier II API Support Engineer

Did I answer your question?
If so, please mark my post as an "Accepted Solution" by clicking the Accept as Solution button in the bottom right hand corner of this post.
Resources
Developer Portal

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

Visit Page

Announcements

API Updates

Join our list to be notified of new features and updates to our V3 API.

Sign Up