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 Access Denied when trying to schedule a campaign thru API

Occasional Contributor

403 Access Denied when trying to schedule a campaign thru API

I am trying to create a campaign and schedule it for delivery in future thru the API. The campaign gets created fine but scheduling fails with 403 Access Denied error. I get an HTML response back which looks like this:


There are 2 issues:

  1. I am not sure why I am not getting access denied when reacting campaign but only when scheduling.
  2. The HTML response is an invalid HTML. It has an <HR> tag that doesn't finish. So, XML parser on my end trips up.

#1 is higher priority for me to resolve. #2 may be a red-herring but I'd like to resolve it so my client doesn't get tripped up and can decipher 403 access denied message.

Occasional Contributor

Re: 403 Access Denied when trying to schedule a campaign thru API

I found this thread which is relevant.


I am going to followup on specified email.



Re: 403 Access Denied when trying to schedule a campaign thru API

The 403 when scheduling is most likely caused by what you found, you have not been provided scheduling API access for your API key.  Sending in that email will start the access process and get you past the 403.


The XML parsing issue is a little trickier.  The HTML content sent to use and returned from us through the API must be XML encoded, since it is XML payload and not XML nodes.  If you encode the HTML content, the <hr> tag will become &gt;ht&lt; and no longer cause XML parsing errors since it doesn't trigger as an XML node.  The solution, and requirement, is to treat everything within the <EmailContent> and <EmailTextContent> nodes as XML encoded content.  If you do this, you should get passed the parsing errors.


If that doesn't solve your problem, please respond with your XML that is failing XML parsing (and please remove any personally identifiable information such as email, username, etc.).  We can look at your XML and see what is going on.

Dave Berard
Senior Product Manager, 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