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.

Error 400 On Creating New Campaign (HTML may be causing issue)

Highlighted
Occasional Participant

Error 400 On Creating New Campaign (HTML may be causing issue)

Hello,

 

I know this type of question has been posted numerous times in the past, so thank you in advance to the patient members who keep answering them.

 

When trying to post a new HTML email campaign through the API, I receive: Error 400: The request contains errors in the common Atom sections, which lie outside <entry> or <Content>, such as <feed>, <id>, <author> or <updated>.

 

My XML:

 

http://www.choodah.com/Newsletter/temp.xml

 

I strongly suspect that the ultimate problem is with the encoding of the HTML, but I'm not certain what exactly the issue is (or how to properly encode the HTML aside from '<' and '>' chars). Any help would be appreciated.

 

Thanks,

Chad

4 REPLIES 4
Highlighted
Occasional Participant

Re: Error 400 (Help, please)

After looking through the XML again, I've found a couple spots to fix - one being that I was closing the EmailContent Tag with an EmailTextContact close tag, and the other potential issue was using an incorrect list ID number. When I attempted to post with much shorter and simpler HTML content, it worked as expected, however using the HTML I had originally intended still causes an error.

 

Any recommendations for encoding HTML?

Highlighted
Occasional Participant

Re: Error 400 (Help, please)

It was an encoding problem. I'm fairly new to XML, but this tool helped: http://coderstoolbox.net/string/

Highlighted
Employee

Re: Error 400 (Help, please)

Hey Pricefalls,

 

That looks like a great tool.  I wanted to make sure that your problem was resolved. 

 

Thanks,

Ryan Davis
Quality Engineer
Highlighted
Occasional Participant

Re: Error 400 (Help, please)

Hi Ryan,

 

Thank you for your reply. My initial problem has been fixed and I'm able to submit HTML campaigns over the API, however I can only submit them as Drafts. I've requested the ability to Schedule/Send, but I haven't heard back CTCT yet (it's been about 1.5 days). How long does it normally take to get an initial response?

 

Chad

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