400 (or 415?) Error posting campaigns.

SOLVED
Go to solution
KevinZ24
Brand Strategist
0 Votes

Hello,

 

I'm getting two different errors. The application that we run every day is returning a 400: Bad Request error with an empty response body.  Strangely, I'm getting a different error when I run the same JSON through Mashery. It returns 415: Unsupported Media Type. The response body of that request is:

 

[{
   
"error_key":"http.header.content_type.invalid",
   
"error_message":"Invalid content type. API only supports application/json."
}]

 Running my JSON through the validator, it gives me an unhelpful error - stating that the beginning quote of the email_content data is to blame:

 

Parse error on line 9:
...   "email_content": "<html xmlns=\"http:
-----------------------^
Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '['

I'm pretty sure the problem is due to one certain news entry, but I can't seem to understand why. The application checks for ISO 8859-1 non-compliant characters and weeds them out. After reviewing the JSON I am not finding anything wrong with it.

 

JSON:

{"name":"Class Action News - 4/28/2014","subject":"Class Action News - Provided by A.B. Data, Ltd.","from_name":"A.B. Data, Ltd.","from_email":"info@abdatanews.com","reply_to_email":"info@abdatanews.com","text_content":"Today's Class Action News","email_content_format":"HTML","email_content": "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head>    <title></title></head><body>    <table style=\"padding: 0px; margin: 0px; text-align: center; background-color: #FFFFFF;        font-family: Arial; width: 100%;\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"        align=\"center\">        <tbody>            <tr>                <td>                    <table cellpadding=\"0\" cellspacing=\"0\" style=\"background-color: #FFFFFF;\">                        <tbody>                            <tr>                                <td style=\"width: 73px; background-color: #d52b1e;\" width=\"73px\">                                </td>                                <td style=\"width: 7px;\" width=\"7px\">                                                                     </td>                                <td width=\"579px\" style=\"width: 579px; vertical-align: bottom;\" valign=\"bottom\">                                    <p style=\"font-family: Arial; font-size: 16pt; color: #3c3c3c; text-align: left;                                        margin: 0px 0px 0px 8px;\">                                        CLASS ACTION ADMINISTRATION</p>                                </td>                            </tr>                            <tr>                                <td style=\"width: 73px; vertical-align: top;\" width=\"73px\">                                    <a href=\"http://www.abdataclassaction.com\">                                        <img src=\"http://www.abdataclassaction.com/Newsletters/Images/logo_nb.gif\" alt=\"A.B. Data, Ltd. :: Logo\"                                            border=\"0\" height=\"106px\" width=\"73px\" /></a>                                </td>                                <td style=\"width: 7px;\" width=\"73px\">                                                                     </td>                                <td width=\"579px\" style=\"width: 579px; background-color: #ebebeb; text-align: center;\"                                    align=\"center\">                                    <img src=\"http://www.abdataclassaction.com/Newsletters/Images/lp_small.jpg\" alt=\"A.B. Data, Ltd. :: Logo\"                                        border=\"0\" height=\"123px\" width=\"579px\" />                                </td>                            </tr>                            <tr>                                <td style=\"width: 73px; background-color: #3c3c3c; text-align: center;\" align=\"center\"                                    width=\"73px\">                                    <a style=\"font-family: Arial; font-size: 12pt; color: #FFFFFF;\" href=\"http://abdataclassaction.com/Retain.aspx\">                                        Retain</a>                                </td>                                <td style=\"width: 7px; background-color: #3c3c3c;\" width=\"7px\">                                                                     </td>                                <td width=\"579px\" style=\"border-width: 0px; vertical-align: top; width: 579px;\" valign=\"top\">                                    <p style=\"padding: 5px; margin: 0px; background-color: #3c3c3c; font-family: Arial;                                        font-size: 18pt; color: #FFFFFF; text-align: center; vertical-align: top; font-weight: bold;\">                                        CLASS ACTION NEWS</p>                                </td>                            </tr>                            <tr>                                <td style=\"width: 73px; vertical-align: top;\" width=\"73px\">                                                                     </td>                                <td style=\"width: 7px;\" width=\"7px\">                                                                     </td>                                <td width=\"579px\" style=\"background-color: #ebebeb; text-align: left; vertical-align: top;                                    width: 579px;\" valign=\"top\">                                    <table border=\"0\" cellpadding=\"2\" cellspacing=\"7\" style=\"vertical-align:top;\">  <tr>  <td width=\"80\" align=\"center\" valign=\"top\">  <font style=\"font-size:85%;font-family:arial,sans-serif\">  </font>  </td>  <td valign=\"top\" class=\"j\">  <font style=\"font-size:85%;font-family:arial,sans-serif\">  <br />  <div style=\"padding-top:0.8em;\">    </div>  <div class=\"lh\">  <a href=\"http://www.law360.com/classaction/articles/525052/6-tips-for-addressing-cy-pres-awards-in-class-acti...  <b></b>  </a><br />  <font size=\"-1\"><b>  <font color=\"#6f6f6f\">6 Tips For Addressing Cy Pres Awards In Class Action</font></b>  </font><br />  <font size=\"-1\">Law360, New York -- Congratulations! You've just settled a big <b>class action</b> on favorable terms. Now all you need to worry about is getting your settlement agreement approved and implemented. One particular concern is how to address settlement funds  ...</font><br />  <font size=\"-1\" class=\"p\"></font><br />  <font class=\"p\" size=\"-1\"></font></div></font></td></tr></table><table border=\"0\" cellpadding=\"2\" cellspacing=\"7\" style=\"vertical-align:top;\"><tr><td valign=\"top\" class=\"j\"><font style=\"font-size:85%;font-family:arial,sans-serif\"><br /><div style=\"padding-top:0.8em;\"></div><div class=\"lh\"><a href=\"http://mdjonline.com/view/full_story/24996353/article-Former-KSU-athlete-joins-lawsuit-against-NCAA?... KSU athlete joins lawsuit against NCAA</b></a><br /><font size=\"-1\"><b><font color=\"#6f6f6f\">Marietta Daily Journal</font></b></font><br /><font size=\"-1\">Former Kennesaw State basketball player Ashley Holliday is one of seven former college athletes who are part of a <b>class</b>-<b>action</b> lawsuit filed against the NCAA and its conferences. Staff file photo. slideshow. MINNEAPOLIS - In a lawsuit filed in <b>...</b></font><br /><font size=\"-1\"><a href=\"http://www.bellinghamherald.com/2014/04/25/3608356/female-athlete-joins-legal-fight.html\">Female athlete joins legal fight against NCAA</a><font size=\"-1\" color=\"#6f6f6f\"><nobr>Bellingham Herald</nobr></font></font><br /><font size=\"-1\" class=\"p\"></font><br /><font class=\"p\" size=\"-1\"><a class=\"p\" href=\"http://news.google.com/news/more?ncl=dCc99Wueqn2EM3MTEP346ANVtZN-M&amp;authuser=0&amp;ned=us\"><nobr... 28 news articles&nbsp;&raquo;</b></nobr></a></font></div></font></td></tr></table><table border=\"0\" cellpadding=\"2\" cellspacing=\"7\" style=\"vertical-align:top;\"><tr><td valign=\"top\" class=\"j\"><font style=\"font-size:85%;font-family:arial,sans-serif\"><br /><div style=\"padding-top:0.8em;\"></div><div class=\"lh\"><a href=\"http://www.forbes.com/sites/timworstall/2014/04/27/apple-google-intel-adobe-escape-cheaply-from-the-... Google, Intel, Adobe Escape Cheaply From The Engineers&#39; <b>Class Action</b> <b>...</b></b></a><br /><font size=\"-1\"><b><font color=\"#6f6f6f\">Forbes</font></b></font><br /><font size=\"-1\">As my colleagues over at Pando Daily have been aghast to find out, no one&#39;s really been paying much attention to the <b>class action</b> suit over wage fixing in Silicon Valley. Certainly there&#39;s not been the outpourings of rage I and they would have expected.</font><br /><font size=\"-1\"><a href=\"http://www.pbs.org/newshour/bb/tech-companies-settle-wages-lawsuit-325-million/\">Tech companies settle wages lawsuit for $325 million</a><font size=\"-1\" color=\"#6f6f6f\"><nobr>PBS</nobr></font></font><br /><font size=\"-1\" class=\"p\"></font><br /><font class=\"p\" size=\"-1\"><a class=\"p\" href=\"http://news.google.com/news/more?ncl=dUQg_qjK3ICJ8tMAm0N4j0aIZUTgM&amp;authuser=0&amp;ned=us\"><nobr... 4 news articles&nbsp;&raquo;</b></nobr></a></font></div></font></td></tr></table><table border=\"0\" cellpadding=\"2\" cellspacing=\"7\" style=\"vertical-align:top;\"><tr><td valign=\"top\" class=\"j\"><font style=\"font-size:85%;font-family:arial,sans-serif\"><br /><div style=\"padding-top:0.8em;\"></div><div class=\"lh\"><a href=\"http://news.ninemsn.com.au/national/2014/04/28/11/32/victorian-hepatitis-c-class-action-settled\"><b... hepatitis C <b>class action</b> settled</b></a><br /><font size=\"-1\"><b><font color=\"#6f6f6f\">Ninemsn</font></b></font><br /><font size=\"-1\">Victorian hepatitis C <b>class action</b> settled. 11:29am April 28, 2014. A group of women infected with hepatitis C at a Melbourne medical clinic has reached a $13.75 million proposed settlement of a <b>class action</b> against the facility. Geoff Huegill and his <b>...</b></font><br /><font size=\"-1\"><a href=\"http://www.theage.com.au/victoria/hep-c-victims-close-to-1375m-settlement-20140428-zr0qs.html\">Hep C victims strike $13.75m deal</a><font size=\"-1\" color=\"#6f6f6f\"><nobr>The Age</nobr></font></font><br /><font size=\"-1\"><a href=\"http://www.theaustralian.com.au/news/nation/women-infected-with-hepatitis-c-at-melbourne-surgery-set... infected with hepatitis C at Melbourne surgery settle for $13.75m million</a><font size=\"-1\" color=\"#6f6f6f\"><nobr>The Australian</nobr></font></font><br /><font size=\"-1\" class=\"p\"></font><br /><font class=\"p\" size=\"-1\"><a class=\"p\" href=\"http://news.google.com/news/more?ncl=dxNx4CmhklhZCJM4v6Fq-Cd-xJ8WM&amp;authuser=0&amp;ned=us\"><nobr... 3 news articles&nbsp;&raquo;</b></nobr></a></font></div></font></td></tr></table><table border=\"0\" cellpadding=\"2\" cellspacing=\"7\" style=\"vertical-align:top;\"><tr><td valign=\"top\" class=\"j\"><font style=\"font-size:85%;font-family:arial,sans-serif\"><br /><div style=\"padding-top:0.8em;\"></div><div class=\"lh\"><a href=\"http://www.bna.com/ninth-circuit-revives-n17179889932/\"><b>Ninth Circuit Revives Police Officers&#39; Age Bias <b>Class Action</b> Over Scrapped Exam</b></a><br /><font size=\"-1\"><b><font color=\"#6f6f6f\">Bloomberg BNA</font></b></font><br /><font size=\"-1\">\"This is a very important issue that I think will have resonance for courts throughout the country,\" Joseph M. Sellers of plaintiffs&#39; <b>class action</b> law firm Cohen Milstein Sellers &amp; Toll PLLC in Washington said April 25. He said class certification has <b>...</b></font><br /><font size=\"-1\" class=\"p\"></font><br /><font class=\"p\" size=\"-1\"><a class=\"p\" href=\"http://news.google.com/news/more?ncl=dTgoQqr2DiSVqhM&amp;authuser=0&amp;ned=us\"><nobr><b></b></nobr... border=\"0\" cellpadding=\"2\" cellspacing=\"7\" style=\"vertical-align:top;\"><tr><td valign=\"top\" class=\"j\"><font style=\"font-size:85%;font-family:arial,sans-serif\"><br /><div style=\"padding-top:0.8em;\"></div><div class=\"lh\"><a href=\"http://www.hypebot.com/hypebot/2014/04/festival-volunteers-bring-class-action-against-live-nation-in... Volunteers Bring <b>Class Action</b> Against Live Nation &amp; Insomniac</b></a><br /><font size=\"-1\"><b><font color=\"#6f6f6f\">hypebot.com</font></b></font><br /><font size=\"-1\">Live Nation and their EDM artner Insomniac Events, producers of the hugely successful Electric Daisy Carnival series, have been hit with a <b>class action</b> lawsuit brought by festival volunteers seeking pay. According to the suit, the companies used <b>...</b></font><br /><font size=\"-1\"><a href=\"http://www.completemusicupdate.com/article/us-lawsuit-to-put-the-spotlight-on-festival-volunteers/\"... lawsuit to put the spotlight on festival volunteers</a><font size=\"-1\" color=\"#6f6f6f\"><nobr>Complete Music Update</nobr></font></font><br /><font size=\"-1\" class=\"p\"></font><br /><font class=\"p\" size=\"-1\"><a class=\"p\" href=\"http://news.google.com/news/more?ncl=doK5OJEImhSUpCM2lR27Wg5sDp0OM&amp;authuser=0&amp;ned=us\"><nobr... 3 news articles&nbsp;&raquo;</b></nobr></a></font></div></font></td></tr></table><table border=\"0\" cellpadding=\"2\" cellspacing=\"7\" style=\"vertical-align:top;\"><tr><td valign=\"top\" class=\"j\"><font style=\"font-size:85%;font-family:arial,sans-serif\"><br /><div style=\"padding-top:0.8em;\"></div><div class=\"lh\"><a href=\"http://www.lexology.com/library/detail.aspx?g%3D6cfb352d-78a8-4d9f-b9ff-2d8cb4173edf\"><b>The new <b>class action</b> regime in France: what you need to know</b></a><br /><font size=\"-1\"><b><font color=\"#6f6f6f\">Lexology (registration)</font></b></font><br /><font size=\"-1\">France&#39;s National Assembly has enacted a new consumer <b>class actions</b> regime, referred to colloquially as the \"Hamon Law\". The bill, which modifies the French Consumer Code (\"Code de la Consommation\"), was passed on February 13, 2014 and will come&nbsp;...</font><br /><font size=\"-1\" class=\"p\"></font><br /><font class=\"p\" size=\"-1\"><a class=\"p\" href=\"http://news.google.com/news/more?ncl=d5F-blawLq054DM&amp;authuser=0&amp;ned=us\"><nobr><b></b></nobr... border=\"0\" cellpadding=\"2\" cellspacing=\"7\" style=\"vertical-align:top;\"><tr><td valign=\"top\" class=\"j\"><font style=\"font-size:85%;font-family:arial,sans-serif\"><br /><div style=\"padding-top:0.8em;\"></div><div class=\"lh\"><a href=\"http://www.lexology.com/library/detail.aspx?g%3Dc439a5b8-d0c8-4bff-9462-5008a87f1ff1\"><b>Burger King can&#39;t have it its way: TCPA <b>class action</b> continues</b></a><br /><font size=\"-1\"><b><font color=\"#6f6f6f\">Lexology (registration)</font></b></font><br /><font size=\"-1\">The United States District Court for the District of Maryland recently refused to dismiss a putative Telephone Consumer Protection Act (\"TCPA\") <b>class action</b> filed against Burger King Corp. (\"Burger King\"), for allegedly sending thousands of <b>...</b></font><br /><font size=\"-1\" class=\"p\"></font><br /><font class=\"p\" size=\"-1\"><a class=\"p\" href=\"http://news.google.com/news/more?ncl=dzk-CahYE4fG7UM&amp;authuser=0&amp;ned=us\"><nobr><b></b></nobr...                                </td>                            </tr>                            <tr>                                <td style=\"width: 73px;\" width=\"73px\">                                                                     </td>                                <td style=\"width: 7px;\" width=\"7px\">                                                                     </td>                                <td style=\"background-color: #FFFFFF; font-family: Arial; font-size: 7.5pt; color: #3c3c3c;                                    text-align: center; width: 579px;\" width=\"579px\">                                    <table style=\"background-color: #FFFFFF; font-family: Arial; font-size: 7.5pt; color: #3c3c3c;                                        text-align: center; width: 100%;\" width=\"100%\">                                        <tbody>                                            <tr>                                                <td style=\"width: 579px; font-family: Arial; font-size: 7.5pt; color: #3c3c3c; padding-top: 5px;                                                    margin-top: 5px;\" width=\"579px\">                                                    <img src=\"http://www.abdataclassaction.com/Images/contact_building.gif\" alt=\"address\"                                                        width=\"11px\" height=\"10px\" />&nbsp;600 A.B. Data Drive, Milwaukee, WI 53217&nbsp;&nbsp;&nbsp;                                                        <img src=\"http://www.abdataclassaction.com/Images/contact_phone.gif\" alt=\"phone\" width=\"11px\"                                                            height=\"10px\" />&nbsp;646-290-9137&nbsp;&nbsp;&nbsp;<img src=\"http://www.abdataclassaction.com/Images/contact_fax.gif\" alt=\"fax\" width=\"11px\"                                                        height=\"10px\" />&nbsp;414-961-7499&nbsp;&nbsp;&nbsp;                                                        <img src=\"http://www.abdataclassaction.com/Images/contact_email.gif\" alt=\"email\"                                                        width=\"11px\" height=\"10px\" />&nbsp;<a style=\"color: #3c3c3c;\" href=\"mailto:info@abdataclassaction.com\">info@abdataclassaction.com</a>                                                </td>                                            </tr>                                            <tr>                                                <td style=\"width: 579px; font-family: Arial; font-size: 7.5pt; color: #3c3c3c;\" width=\"579px\">                                                    <strong>Washington, D.C., &nbsp;New York, NY, &nbsp;San                                                        Francisco, CA, &nbsp;Milwaukee, WI, &nbsp;West Palm Beach,                                                        FL</strong>                                                </td>                                            </tr>                                            <tr>                                                <td style=\"width: 579px; font-family: Arial; font-size: 7.5pt; color: #3c3c3c; text-align: justify;\"                                                    width=\"579px\">                                                    Founded in 1980, A.B. Data has earned an international reputation for expertly managing                                                    the complexities of class action administration in securities, ERISA, consumer,                                                    antitrust, employment, civil rights, insurance, environmental, and other class action                                                    cases. Dedicated professionals deliver A.B. Data's all-inclusive services, working                                                    in partnership with its clients to administer their class action cases effectively,                                                    efficiently, and affordably, regardless of size or scope.                                                </td>                                            </tr>                                            <tr>                                                <td style=\"width: 579px; font-family: Arial; font-size: 7.5pt; color: #3c3c3c;\" width=\"579px\">                                                    <table style=\"width: 73px; text-align: center;\" align=\"center\" width=\"73px\">                                                        <tbody>                                                            <tr>                                                                <td style=\"text-align: right; margin: 3px auto; padding: 3px auto;\" align=\"right\">                                                                    <a href=\"http://www.facebook.com/pages/AB-Data-Ltd/129039655997\">                                                                        <img src=\"http://www.abdataclassaction.com/Newsletters/Images/facebook_24.jpg\" alt=\"A.B. Data, Ltd. :: Facebook\"                                                                            border=\"0\" height=\"24px\" width=\"24px\" /></a>                                                                </td>                                                                <td style=\"text-align: right; margin: 3px auto; padding: 3px auto;\" align=\"right\">                                                                    <a href=\"http://twitter.com/ClassActionABD\">                                                                        <img src=\"http://www.abdataclassaction.com/Newsletters/Images/twitter_24.png\" alt=\"A.B. Data, Ltd. :: Twitter\"                                                                            border=\"0\" height=\"25px\" width=\"25px\" /></a>                                                                </td>                                                                <td style=\"text-align: right; margin: 3px auto; padding: 3px auto;\" align=\"right\">                                                                    <a href=\"http://www.linkedin.com/company/ab-data-ltd\">                                                                        <img src=\"http://www.abdataclassaction.com/Newsletters/Images/linkedin_24.gif\" alt=\"A.B. Data, Ltd. :: Linked In\"                                                                            border=\"0\" height=\"24px\" width=\"24px\" /></a>                                                                </td>                                                                <td style=\"text-align: right; margin: 3px auto; padding: 3px auto;\" align=\"right\">                                                                    <a href=\"http://rss.abdataclassaction.com/NewsFeed.xml\">                                                                        <img src=\"http://www.abdataclassaction.com/Newsletters/Images/rss_24.gif\" alt=\"A.B. Data, Ltd. :: Rss\"                                                                            border=\"0\" height=\"24px\" width=\"24px\" /></a>                                                                </td>                                                            </tr>                                                        </tbody>                                                    </table>                                                </td>                                            </tr>                                            <tr>                                                <td style=\"width: 579px; font-family: Arial; font-size: 7.5pt; color: #3c3c3c;\" width=\"579px\">                                                    &copy; 2014 A.B. Data, Ltd. All Rights Reserved.                                                </td>                                            </tr>                                            <tr>                                                <td style=\"width: 579px; font-family: Arial; font-size: 7.5pt; color: #3c3c3c;\" width=\"579px\">                                                    You are receiving this complimentary news service because         you subscribed to A.B.                                                    Data's Class Action News.                                                </td>                                            </tr>                                            <tr>                                                <td style=\"width: 579px; font-family: Arial; font-size: 7.5pt; color: #3c3c3c;\" width=\"579px\">                                                    <a style=\"font-family: Arial; font-size: 7.5pt; color: #3c3c3c;\" href=\"http://abdataclassaction.com/Retain.aspx\">                                                        Retain A.B. Data</a>&nbsp;&nbsp;&nbsp;<a style=\"color: #3c3c3c;\" href=\"http://abdataclassaction.com\">abdataclassaction.com</a>                                                        &nbsp;&nbsp;&nbsp;<a style=\"color: #3c3c3c;\" href=\"http://www.abdataclassaction.com/SubscribeToABDataNews.aspx\">Unsubscribe                                                            from Class Action News</a>                                                </td>                                            </tr>                                        </tbody>                                    </table>                                </td>                            </tr>                        </tbody>                    </table>                </td>            </tr>        </tbody>    </table></body></html>","message_footer":{"organization_name":"A.B. Data, Ltd.","address_line_1":"600 A B Data Drive","city":"Milwaukee","state":"WI","postal_code":"53217","country":"USA"}, "sent_to_contact_lists": [{"id":"2"}]}

 Request Call (hasn't changed for months, don't think it's the issue):

 

 https://api.constantcontact.com/v2/emailmarketing/campaigns?api_key=[apiKeyHidden]

 

Any help would be greatly appreciated.

 

Thanks,

Paul

 

1 ACCEPTED SOLUTION
Shannon_W
Employee
0 Votes

Hi,

 

Sorry to hear about the issue. The error I got back when trying to post that campaign to my account was:

 

[{"error_key":"http.status.bad_request","error_message":"Your html code contains a url link to&nbsp                             \"http://www.law360.com/classaction/articles/525052/6-tips-for-addressing-cy-pres-awards-in-class-acti...<br />Hint: is there whitespace (space or carriage return) before or after the \"=\" in \"href=\" ? <br />For more information, please see our <a href=\"#\" onClick=\"WindowControl.openHelpWin('http://support2.constantcontact.com/CTCTSupportSiteFAQs'); return false;\">FAQs</a>"}]

 

Indeed, when I found and deleted the white space indicated, I had no problem creating the campaign to my account (changing the list id, and from/reply-to email address). Let me know if you still have issues.

 

Best Regards,

Shannon Wallace

Partner API Support Engineer

 

 

View solution in original post

7 REPLIES 7
DaveBerard
Employee
0 Votes

The first error you are receiving is returned if you have an invalid accept header.  If the accept header is provided, it must be application/json.  If you provide a different value for Accept, you'd receive a 415 unsupported content type error.

 

The second error from the validator doesn't look like it's related.  I put your JSON posted through a validator and it ran fine.  Also, it passes our Schema.  Are you sure you are setting the correct Accept header in your calls?

Dave Berard
Senior Product Manager, Constant Contact
KevinZ24
Brand Strategist
0 Votes

Not sure, I don't think I set an accept header. I have added a request header though. My HTTP POST call looks like this:

 

string responseFromServer = string.Empty;
WebRequest request = WebRequest.Create(requestCall);
request.Method = "POST";
byte[] byteArray = Encoding.UTF8.GetBytes(postData);
string authHeader = string.Format("Bearer {0}", ConfigurationManager.AppSettings["APIv2AccessToken"].ToString());
request.Headers.Add("Authorization", authHeader);
request.Headers.Add(HttpRequestHeader.ContentType.ToString(), "application/json");
request.ContentLength = byteArray.Length;
Stream dataStream = request.GetRequestStream();
dataStream.Write(byteArray, 0, byteArray.Length);
dataStream.Close();
using (WebResponse response = request.GetResponse())
{
Console.WriteLine(((HttpWebResponse)response).StatusDescription);
dataStream = response.GetResponseStream();
using (StreamReader reader = new StreamReader(dataStream))
{
responseFromServer = reader.ReadToEnd();
}
}
dataStream.Close();
return responseFromServer;

 I haven't had a problem with my request headers before. Did something in the API change?

 

Thanks,

Paul

 

KevinZ24
Brand Strategist
0 Votes

Here is another JSON output of the email we tried to send today. This time running it through the JSON Lint validator returns that error message I posted above, at "email_content".

 

{
    "name": "Class Action News - 4/29/2014",
    "subject": "Class Action News - Provided by A.B. Data, Ltd.",
    "from_name": "A.B. Data, Ltd.",
    "from_email": "info@abdatanews.com",
    "reply_to_email": "info@abdatanews.com",
    "text_content": "Today's Class Action News",
    "email_content_format": "HTML",
    "email_content": "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head>    <title></title></head><body>    <table style=\"padding: 0px; margin: 0px; text-align: center; background-color: #FFFFFF;        font-family: Arial; width: 100%;\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"        align=\"center\">        <tbody>            <tr>                <td>                    <table cellpadding=\"0\" cellspacing=\"0\" style=\"background-color: #FFFFFF;\">                        <tbody>                            <tr>                                <td style=\"width: 73px; background-color: #d52b1e;\" width=\"73px\">                                </td>                                <td style=\"width: 7px;\" width=\"7px\">                                                                     </td>                                <td width=\"579px\" style=\"width: 579px; vertical-align: bottom;\" valign=\"bottom\">                                    <p style=\"font-family: Arial; font-size: 16pt; color: #3c3c3c; text-align: left;                                        margin: 0px 0px 0px 8px;\">                                        CLASS ACTION ADMINISTRATION</p>                                </td>                            </tr>                            <tr>                                <td style=\"width: 73px; vertical-align: top;\" width=\"73px\">                                    <a href=\"http://www.abdataclassaction.com\">                                        <img src=\"http://www.abdataclassaction.com/Newsletters/Images/logo_nb.gif\" alt=\"A.B. Data, Ltd. :: Logo\"                                            border=\"0\" height=\"106px\" width=\"73px\" /></a>                                </td>                                <td style=\"width: 7px;\" width=\"73px\">                                                                     </td>                                <td width=\"579px\" style=\"width: 579px; background-color: #ebebeb; text-align: center;\"                                    align=\"center\">                                    <img src=\"http://www.abdataclassaction.com/Newsletters/Images/lp_small.jpg\" alt=\"A.B. Data, Ltd. :: Logo\"                                        border=\"0\" height=\"123px\" width=\"579px\" />                                </td>                            </tr>                            <tr>                                <td style=\"width: 73px; background-color: #3c3c3c; text-align: center;\" align=\"center\"                                    width=\"73px\">                                    <a style=\"font-family: Arial; font-size: 12pt; color: #FFFFFF;\" href=\"http://abdataclassaction.com/Retain.aspx\">                                        Retain</a>                                </td>                                <td style=\"width: 7px; background-color: #3c3c3c;\" width=\"7px\">                                                                     </td>                                <td width=\"579px\" style=\"border-width: 0px; vertical-align: top; width: 579px;\" valign=\"top\">                                    <p style=\"padding: 5px; margin: 0px; background-color: #3c3c3c; font-family: Arial;                                        font-size: 18pt; color: #FFFFFF; text-align: center; vertical-align: top; font-weight: bold;\">                                        CLASS ACTION NEWS</p>                                </td>                            </tr>                            <tr>                                <td style=\"width: 73px; vertical-align: top;\" width=\"73px\">                                                                     </td>                                <td style=\"width: 7px;\" width=\"7px\">                                                                     </td>                                <td width=\"579px\" style=\"background-color: #ebebeb; text-align: left; vertical-align: top;                                    width: 579px;\" valign=\"top\">                                    <table border=\"0\" cellpadding=\"2\" cellspacing=\"7\" style=\"vertical-align:top;\">	  <tr>	  <td width=\"80\" align=\"center\" valign=\"top\">	  <font style=\"font-size:85%;font-family:arial,sans-serif\">	  </font>	  </td>	  <td valign=\"top\" class=\"j\">	  <font style=\"font-size:85%;font-family:arial,sans-serif\">	  <br />	  <div style=\"padding-top:0.8em;\">	  	  </div>	  <div class=\"lh\">	  <a href=\"http://www.law360.com/classaction/articles/525052/6-tips-for-addressing-cy-pres-awards-in-class-acti...	  <b>6 Tips For Addressing Cy Pres Awards In Class Actions</b>	  </a><br />	  <font size=\"-1\"><b>	  <font color=\"#6f6f6f\">Law360</font></b>	  </font><br />	  <font size=\"-1\">Law360, New York -- Congratulations! You've just settled a big <b>class action</b> on favorable terms. Now all you need to worry about is getting your settlement agreement approved and implemented. One particular concern is how to address settlement funds  ...</font><br />	  <font size=\"-1\" class=\"p\"></font><br />	  <font class=\"p\" size=\"-1\"></font></div></font></td></tr></table><table border=\"0\" cellpadding=\"2\" cellspacing=\"7\" style=\"vertical-align:top;\"><tr><td valign=\"top\" class=\"j\"><font style=\"font-size:85%;font-family:arial,sans-serif\"><br /><div style=\"padding-top:0.8em;\"></div><div class=\"lh\"><a href=\"http://www.bna.com/ninth-circuit-revives-n17179889932/\"><b>Ninth Circuit Revives Police Officers&#39; Age Bias <b>Class Action</b> Over Scrapped Exam</b></a><br /><font size=\"-1\"><b><font color=\"#6f6f6f\">Bloomberg BNA</font></b></font><br /><font size=\"-1\">\"This is a very important issue that I think will have resonance for courts throughout the country,\" Joseph M. Sellers of plaintiffs&#39; <b>class action</b> law firm Cohen Milstein Sellers &amp; Toll PLLC in Washington said April 25. He said class certification has <b>...</b></font><br /><font size=\"-1\" class=\"p\"></font><br /><font class=\"p\" size=\"-1\"><a class=\"p\" href=\"http://news.google.com/news/more?ncl=dTgoQqr2DiSVqhM&amp;authuser=0&amp;ned=us\"><nobr><b></b></nobr... border=\"0\" cellpadding=\"2\" cellspacing=\"7\" style=\"vertical-align:top;\"><tr><td valign=\"top\" class=\"j\"><font style=\"font-size:85%;font-family:arial,sans-serif\"><br /><div style=\"padding-top:0.8em;\"></div><div class=\"lh\"><a href=\"http://www.hypebot.com/hypebot/2014/04/festival-volunteers-bring-class-action-against-live-nation-in... Volunteers Bring <b>Class Action</b> Against Live Nation &amp; Insomniac</b></a><br /><font size=\"-1\"><b><font color=\"#6f6f6f\">hypebot.com</font></b></font><br /><font size=\"-1\">Live Nation and their EDM artner Insomniac Events, producers of the hugely successful Electric Daisy Carnival series, have been hit with a <b>class action</b> lawsuit brought by festival volunteers seeking pay. According to the suit, the companies used <b>...</b></font><br /><font size=\"-1\"><a href=\"http://www.completemusicupdate.com/article/us-lawsuit-to-put-the-spotlight-on-festival-volunteers/\"... lawsuit to put the spotlight on festival volunteers</a><font size=\"-1\" color=\"#6f6f6f\"><nobr>Complete Music Update</nobr></font></font><br /><font size=\"-1\" class=\"p\"></font><br /><font class=\"p\" size=\"-1\"><a class=\"p\" href=\"http://news.google.com/news/more?ncl=doK5OJEImhSUpCM2lR27Wg5sDp0OM&amp;authuser=0&amp;ned=us\"><nobr... 3 news articles&nbsp;&raquo;</b></nobr></a></font></div></font></td></tr></table><table border=\"0\" cellpadding=\"2\" cellspacing=\"7\" style=\"vertical-align:top;\"><tr><td valign=\"top\" class=\"j\"><font style=\"font-size:85%;font-family:arial,sans-serif\"><br /><div style=\"padding-top:0.8em;\"></div><div class=\"lh\"><a href=\"http://www.lexology.com/library/detail.aspx?g%3D6cfb352d-78a8-4d9f-b9ff-2d8cb4173edf\"><b>The new <b>class action</b> regime in France: what you need to know</b></a><br /><font size=\"-1\"><b><font color=\"#6f6f6f\">Lexology (registration)</font></b></font><br /><font size=\"-1\">France&#39;s National Assembly has enacted a new consumer <b>class actions</b> regime, referred to colloquially as the \"Hamon Law\". The bill, which modifies the French Consumer Code (\"Code de la Consommation\"), was passed on February 13, 2014 and will come&nbsp;...</font><br /><font size=\"-1\" class=\"p\"></font><br /><font class=\"p\" size=\"-1\"><a class=\"p\" href=\"http://news.google.com/news/more?ncl=d5F-blawLq054DM&amp;authuser=0&amp;ned=us\"><nobr><b></b></nobr... border=\"0\" cellpadding=\"2\" cellspacing=\"7\" style=\"vertical-align:top;\"><tr><td valign=\"top\" class=\"j\"><font style=\"font-size:85%;font-family:arial,sans-serif\"><br /><div style=\"padding-top:0.8em;\"></div><div class=\"lh\"><a href=\"http://www.lexology.com/library/detail.aspx?g%3Dc439a5b8-d0c8-4bff-9462-5008a87f1ff1\"><b>Burger King can&#39;t have it its way: TCPA <b>class action</b> continues</b></a><br /><font size=\"-1\"><b><font color=\"#6f6f6f\">Lexology (registration)</font></b></font><br /><font size=\"-1\">The United States District Court for the District of Maryland recently refused to dismiss a putative Telephone Consumer Protection Act (\"TCPA\") <b>class action</b> filed against Burger King Corp. (\"Burger King\"), for allegedly sending thousands of <b>...</b></font><br /><font size=\"-1\" class=\"p\"></font><br /><font class=\"p\" size=\"-1\"><a class=\"p\" href=\"http://news.google.com/news/more?ncl=dzk-CahYE4fG7UM&amp;authuser=0&amp;ned=us\"><nobr><b></b></nobr... border=\"0\" cellpadding=\"2\" cellspacing=\"7\" style=\"vertical-align:top;\"><tr><td valign=\"top\" class=\"j\"><font style=\"font-size:85%;font-family:arial,sans-serif\"><br /><div style=\"padding-top:0.8em;\"></div><div class=\"lh\"><a href=\"http://online.wsj.com/article/PR-CO-20140428-911745.html\"><b>UPCOMING DEADLINE: LEVI &amp; KORSINSKY, LLP Reminds Investors of <b>Class</b> <b>...</b></b></a><br /><font size=\"-1\"><b><font color=\"#6f6f6f\">Wall Street Journal</font></b></font><br /><font size=\"-1\">NEW YORK, April 28, 2014 (GLOBE NEWSWIRE) -- Levi &amp; Korsinsky announces that a <b>class action</b> lawsuit has been commenced in the United States District Court for the District of Arizona on behalf of investors who purchased Apollo Education Group, Inc.</font><br /><font size=\"-1\" class=\"p\"></font><br /><font class=\"p\" size=\"-1\"><a class=\"p\" href=\"http://news.google.com/news/more?ncl=deTzA6K68MywkxM&amp;authuser=0&amp;ned=us\"><nobr><b></b></nobr... border=\"0\" cellpadding=\"2\" cellspacing=\"7\" style=\"vertical-align:top;\"><tr><td valign=\"top\" class=\"j\"><font style=\"font-size:85%;font-family:arial,sans-serif\"><br /><div style=\"padding-top:0.8em;\"></div><div class=\"lh\"><a href=\"http://www.law360.com/articles/532378/judge-puts-the-brakes-on-2nd-avis-toll-fee-class-action\"><b>J... Puts The Brakes On 2nd Avis Toll Fee <b>Class Action</b></b></a><br /><font size=\"-1\"><b><font color=\"#6f6f6f\">Law360 (subscription)</font></b></font><br /><font size=\"-1\">Law360, New York (April 28, 2014, 3:00 PM ET) -- A New York federal judge on Monday halted a <b>class action</b> alleging Avis Budget Group Inc. and Avis Rent A Car System LLC unfairly levied fees for toll collection devices, saying it would have to wait <b>...</b></font><br /><font size=\"-1\" class=\"p\"></font><br /><font class=\"p\" size=\"-1\"><a class=\"p\" href=\"http://news.google.com/news/more?ncl=d8NmSgF7d9krKTM&amp;authuser=0&amp;ned=us\"><nobr><b></b></nobr... border=\"0\" cellpadding=\"2\" cellspacing=\"7\" style=\"vertical-align:top;\"><tr><td valign=\"top\" class=\"j\"><font style=\"font-size:85%;font-family:arial,sans-serif\"><br /><div style=\"padding-top:0.8em;\"></div><div class=\"lh\"><a href=\"http://www.kcci.com/news/classaction-lawsuit-proposed-over-states-jobs-blacklist/25700738\"><b><b>Cl... lawsuit proposed over state jobs blacklist</b></a><br /><font size=\"-1\"><b><font color=\"#6f6f6f\">KCCI Des Moines</font></b></font><br /><font size=\"-1\">Photos. A proposed <b>class</b>-<b>action</b> lawsuit brought by former Iowa executive branch employees claims the state&#39;s so-called blacklist is illegal. Other Stories. Tornado watch: Storms bring heavy... Do you recognize this man? Track storms on KCCI&#39;s app for <b>...</b></font><br /><font size=\"-1\"><a href=\"http://www.thonline.com/news/iowa-illinois-wisconsin/article_95f1df36-cf12-11e3-bbb9-0017a43b2370.ht... challenges Iowa &#39;blacklist&#39;</a><font size=\"-1\" color=\"#6f6f6f\"><nobr>Dubuque Telegraph Herald</nobr></font></font><br /><font size=\"-1\" class=\"p\"></font><br /><font class=\"p\" size=\"-1\"><a class=\"p\" href=\"http://news.google.com/news/more?ncl=dB_Ks1v3jQKIW5MPJy3-adDTSlhjM&amp;authuser=0&amp;ned=us\"><nobr... 1 news articles&nbsp;&raquo;</b></nobr></a></font></div></font></td></tr></table><table border=\"0\" cellpadding=\"2\" cellspacing=\"7\" style=\"vertical-align:top;\"><tr><td valign=\"top\" class=\"j\"><font style=\"font-size:85%;font-family:arial,sans-serif\"><br /><div style=\"padding-top:0.8em;\"></div><div class=\"lh\"><a href=\"http://online.wsj.com/article/PR-CO-20140428-913069.html\"><b>Robbins Geller Rudman &amp; Dowd LLP Files <b>Class Action</b> Suit Against The ADT <b>...</b></b></a><br /><font size=\"-1\"><b><font color=\"#6f6f6f\">Wall Street Journal</font></b></font><br /><font size=\"-1\">Robbins Geller Rudman &amp; Dowd LLP (&quot;Robbins Geller&quot;) (http://www.rgrdlaw.com/cases/adt/) today announced that a <b>class action</b> has been commenced in the United States District Court for the Southern District of Florida on behalf of purchasers of The ADT&nbsp;...</font><br /><font size=\"-1\" class=\"p\"></font><br /><font class=\"p\" size=\"-1\"><a class=\"p\" href=\"http://news.google.com/news/more?ncl=dh3rH4KQXVM-wwM&amp;authuser=0&amp;ned=us\"><nobr><b></b></nobr... border=\"0\" cellpadding=\"2\" cellspacing=\"7\" style=\"vertical-align:top;\"><tr><td valign=\"top\" class=\"j\"><font style=\"font-size:85%;font-family:arial,sans-serif\"><br /><div style=\"padding-top:0.8em;\"></div><div class=\"lh\"><a href=\"http://www.benefitspro.com/2014/04/28/nevada-exchange-faces-state-class-action-suit\"><b>Nevada exchange faces state <b>class</b>-<b>action</b> suit</b></a><br /><font size=\"-1\"><b><font color=\"#6f6f6f\">BenefitsPro</font></b></font><br /><font size=\"-1\">A Las Vegas lawyer is trying to organize a <b>class</b>-<b>action</b> lawsuit against the managers of the Nevada public health insurance exchange and a lead vendor. The lawyer, Matthew Q. Callister, filed a <b>class</b>-<b>action</b> complaint in a state court in Clark County, Nev.</font><br /><font size=\"-1\" class=\"p\"></font><br /><font class=\"p\" size=\"-1\"><a class=\"p\" href=\"http://news.google.com/news/more?ncl=dZjwmUnQcj2O7kM&amp;authuser=0&amp;ned=us\"><nobr><b></b></nobr... border=\"0\" cellpadding=\"2\" cellspacing=\"7\" style=\"vertical-align:top;\"><tr><td valign=\"top\" class=\"j\"><font style=\"font-size:85%;font-family:arial,sans-serif\"><br /><div style=\"padding-top:0.8em;\"></div><div class=\"lh\"><a href=\"http://online.wsj.com/article/SB10001424052702304893404579530262159284736.html\"><b>Mt. Gox Creditors, Investors Agree to Try to Revive Bitcoin Exchange</b></a><br /><font size=\"-1\"><b><font color=\"#6f6f6f\">Wall Street Journal</font></b></font><br /><font size=\"-1\">Lawyers for creditors involved in a proposed <b>class</b>-<b>action</b> lawsuit against Mt. Gox have reached an agreement to support a group of U.S. investors&#39; bid to revive the bankrupt bitcoin exchange, an agreement that would give the creditors a 16.5% stake in <b>...</b></font><br /><font size=\"-1\" class=\"p\"></font><br /><font class=\"p\" size=\"-1\"><a class=\"p\" href=\"http://news.google.com/news/more?ncl=dhAO9WKq3eRfqeM&amp;authuser=0&amp;ned=us\"><nobr><b></b></nobr... border=\"0\" cellpadding=\"2\" cellspacing=\"7\" style=\"vertical-align:top;\"><tr><td valign=\"top\" class=\"j\"><font style=\"font-size:85%;font-family:arial,sans-serif\"><br /><div style=\"padding-top:0.8em;\"></div><div class=\"lh\"><a href=\"http://www.reuters.com/article/2014/04/29/us-bitcoin-mtgox-settlement-idUSBREA3S02W20140429\"><b>Bit... traders settle <b>class actions</b> over failed Mt Gox exchange</b></a><br /><font size=\"-1\"><b><font color=\"#6f6f6f\">Reuters</font></b></font><br /><font size=\"-1\">(Reuters) - U.S. and Canadian customers of failed Tokyo-based bitcoin exchange Mt. Gox have agreed to settle their proposed <b>class action</b> lawsuits that alleged the company defrauded them of hundreds of millions of dollars. The <b>class action</b> plaintiffs <b>...</b></font><br /><font size=\"-1\"><a href=\"http://online.wsj.com/article/SB10001424052702304893404579530262159284736.html\">Mt. Gox Creditors, Investors Agree to Try to Revive Bitcoin Exchange</a><font size=\"-1\" color=\"#6f6f6f\"><nobr>Wall Street Journal</nobr></font></font><br /><font size=\"-1\"><a href=\"http://www.cryptocoinsnews.com/news/mt-gox-customers-u-s-canada-reach-potential-settlement-aiming-fu... Gox Customers in US and Canada Reach Potential Settlement Aiming for <b>...</b></a><font size=\"-1\" color=\"#6f6f6f\"><nobr>CryptoCoinsNews</nobr></font></font><br /><font size=\"-1\"><a href=\"http://www.businessinsider.com/mtgox-may-not-be-dead-yet-2014-4?utm_source%3Dfeedburner%26utm_medium... May Not Be Dead Yet</a><font size=\"-1\" color=\"#6f6f6f\"><nobr>Business Insider</nobr></font></font><br /><font size=\"-1\" class=\"p\"></font><br /><font class=\"p\" size=\"-1\"><a class=\"p\" href=\"http://news.google.com/news/more?ncl=dPsJ_4fBrlekkIMhAO9WKq3eRfqeM&amp;authuser=0&amp;ned=us\"><nobr... 6 news articles&nbsp;&raquo;</b></nobr></a></font></div></font></td></tr></table><table border=\"0\" cellpadding=\"2\" cellspacing=\"7\" style=\"vertical-align:top;\"><tr><td valign=\"top\" class=\"j\"><font style=\"font-size:85%;font-family:arial,sans-serif\"><br /><div style=\"padding-top:0.8em;\"></div><div class=\"lh\"><a href=\"http://www.businesswire.com/news/home/20140429005461/en/INVESTOR-ALERT-Class-Action-Lawsuit-Axesstel... ALERT: <b>Class Action</b> Lawsuit Against Axesstel, Inc. Announced by <b>...</b></b></a><br /><font size=\"-1\"><b><font color=\"#6f6f6f\">Business Wire (press release)</font></b></font><br /><font size=\"-1\">BENSALEM, Pa.--(BUSINESS WIRE)--Law Offices of Howard G. Smith announces that a <b>class action</b> lawsuit has been filed in the United States District Court for the Southern District of California on behalf of all purchasers of the securities of Axesstel, Inc.</font><br /><font size=\"-1\"><a href=\"http://www.heraldonline.com/2014/04/29/5912282/rigrodsky-long-pa-announces-a.html?sp%3D/100/773/385/... &amp; Long, PA Announces A Securities Fraud <b>Class Action</b> Lawsuit Has <b>...</b></a><font size=\"-1\" color=\"#6f6f6f\"><nobr>The Herald | HeraldOnline.com (press release)</nobr></font></font><br /><font size=\"-1\"><a href=\"http://globenewswire.com/news-release/2014/04/28/630692/10078664/en/EQUITY-ALERT-The-Rosen-Law-Firm-... ALERT: The Rosen Law Firm Announces Filing of Securities Fraud <b>...</b></a><font size=\"-1\" color=\"#6f6f6f\"><nobr>GlobeNewswire (press release)</nobr></font></font><br /><font size=\"-1\"><a href=\"http://www.digitaljournal.com/pr/1878496\">SHAREHOLDER ALERT: Pomerantz Law Firm Investigates Claims On Behalf of <b>...</b></a><font size=\"-1\" color=\"#6f6f6f\"><nobr>DigitalJournal.com</nobr></font></font><br /><font size=\"-1\" class=\"p\"></font><br /><font class=\"p\" size=\"-1\"><a class=\"p\" href=\"http://news.google.com/news/more?ncl=d4zurV2Kolie8YM356lX3rlWYxZKM&amp;authuser=0&amp;ned=us\"><nobr... 9 news articles&nbsp;&raquo;</b></nobr></a></font></div></font></td></tr></table><table border=\"0\" cellpadding=\"2\" cellspacing=\"7\" style=\"vertical-align:top;\"><tr><td valign=\"top\" class=\"j\"><font style=\"font-size:85%;font-family:arial,sans-serif\"><br /><div style=\"padding-top:0.8em;\"></div><div class=\"lh\"><a href=\"http://www.law360.com/classaction/articles/532623/ex-howard-stern-intern-hits-sirius-with-wage-class... Stern Intern Hits Sirius With Wage <b>Class Action</b></b></a><br /><font size=\"-1\"><b><font color=\"#6f6f6f\">Law360 (subscription)</font></b></font><br /><font size=\"-1\">Law360, New York (April 29, 2014, 12:59 PM ET) -- A former intern for The Howard Stern Show filed a proposed <b>class action</b> Monday in New York federal court against Sirius XM Radio Inc. alleging the satellite radio company violated labor laws by not <b>...</b></font><br /><font size=\"-1\" class=\"p\"></font><br /><font class=\"p\" size=\"-1\"><a class=\"p\" href=\"http://news.google.com/news/more?ncl=dMy2y8PFlzu6-1M&amp;authuser=0&amp;ned=us\"><nobr><b>and more&nbsp;&raquo;</b></nobr></a></font></div></font></td></tr></table>                                </td>                            </tr>                            <tr>                                <td style=\"width: 73px;\" width=\"73px\">                                                                     </td>                                <td style=\"width: 7px;\" width=\"7px\">                                                                     </td>                                <td style=\"background-color: #FFFFFF; font-family: Arial; font-size: 7.5pt; color: #3c3c3c;                                    text-align: center; width: 579px;\" width=\"579px\">                                    <table style=\"background-color: #FFFFFF; font-family: Arial; font-size: 7.5pt; color: #3c3c3c;                                        text-align: center; width: 100%;\" width=\"100%\">                                        <tbody>                                            <tr>                                                <td style=\"width: 579px; font-family: Arial; font-size: 7.5pt; color: #3c3c3c; padding-top: 5px;                                                    margin-top: 5px;\" width=\"579px\">                                                    <img src=\"http://www.abdataclassaction.com/Images/contact_building.gif\" alt=\"address\"                                                        width=\"11px\" height=\"10px\" />&nbsp;600 A.B. Data Drive, Milwaukee, WI 53217&nbsp;&nbsp;&nbsp;                                                        <img src=\"http://www.abdataclassaction.com/Images/contact_phone.gif\" alt=\"phone\" width=\"11px\"                                                            height=\"10px\" />&nbsp;646-290-9137&nbsp;&nbsp;&nbsp;<img src=\"http://www.abdataclassaction.com/Images/contact_fax.gif\" alt=\"fax\" width=\"11px\"                                                        height=\"10px\" />&nbsp;414-961-7499&nbsp;&nbsp;&nbsp;                                                        <img src=\"http://www.abdataclassaction.com/Images/contact_email.gif\" alt=\"email\"                                                        width=\"11px\" height=\"10px\" />&nbsp;<a style=\"color: #3c3c3c;\" href=\"mailto:info@abdataclassaction.com\">info@abdataclassaction.com</a>                                                </td>                                            </tr>                                            <tr>                                                <td style=\"width: 579px; font-family: Arial; font-size: 7.5pt; color: #3c3c3c;\" width=\"579px\">                                                    <strong>Washington, D.C., &nbsp;New York, NY, &nbsp;San                                                        Francisco, CA, &nbsp;Milwaukee, WI, &nbsp;West Palm Beach,                                                        FL</strong>                                                </td>                                            </tr>                                            <tr>                                                <td style=\"width: 579px; font-family: Arial; font-size: 7.5pt; color: #3c3c3c; text-align: justify;\"                                                    width=\"579px\">                                                    Founded in 1980, A.B. Data has earned an international reputation for expertly managing                                                    the complexities of class action administration in securities, ERISA, consumer,                                                    antitrust, employment, civil rights, insurance, environmental, and other class action                                                    cases. Dedicated professionals deliver A.B. Data's all-inclusive services, working                                                    in partnership with its clients to administer their class action cases effectively,                                                    efficiently, and affordably, regardless of size or scope.                                                </td>                                            </tr>                                            <tr>                                                <td style=\"width: 579px; font-family: Arial; font-size: 7.5pt; color: #3c3c3c;\" width=\"579px\">                                                    <table style=\"width: 73px; text-align: center;\" align=\"center\" width=\"73px\">                                                        <tbody>                                                            <tr>                                                                <td style=\"text-align: right; margin: 3px auto; padding: 3px auto;\" align=\"right\">                                                                    <a href=\"http://www.facebook.com/pages/AB-Data-Ltd/129039655997\">                                                                        <img src=\"http://www.abdataclassaction.com/Newsletters/Images/facebook_24.jpg\" alt=\"A.B. Data, Ltd. :: Facebook\"                                                                            border=\"0\" height=\"24px\" width=\"24px\" /></a>                                                                </td>                                                                <td style=\"text-align: right; margin: 3px auto; padding: 3px auto;\" align=\"right\">                                                                    <a href=\"http://twitter.com/ClassActionABD\">                                                                        <img src=\"http://www.abdataclassaction.com/Newsletters/Images/twitter_24.png\" alt=\"A.B. Data, Ltd. :: Twitter\"                                                                            border=\"0\" height=\"25px\" width=\"25px\" /></a>                                                                </td>                                                                <td style=\"text-align: right; margin: 3px auto; padding: 3px auto;\" align=\"right\">                                                                    <a href=\"http://www.linkedin.com/company/ab-data-ltd\">                                                                        <img src=\"http://www.abdataclassaction.com/Newsletters/Images/linkedin_24.gif\" alt=\"A.B. Data, Ltd. :: Linked In\"                                                                            border=\"0\" height=\"24px\" width=\"24px\" /></a>                                                                </td>                                                                <td style=\"text-align: right; margin: 3px auto; padding: 3px auto;\" align=\"right\">                                                                    <a href=\"http://rss.abdataclassaction.com/NewsFeed.xml\">                                                                        <img src=\"http://www.abdataclassaction.com/Newsletters/Images/rss_24.gif\" alt=\"A.B. Data, Ltd. :: Rss\"                                                                            border=\"0\" height=\"24px\" width=\"24px\" /></a>                                                                </td>                                                            </tr>                                                        </tbody>                                                    </table>                                                </td>                                            </tr>                                            <tr>                                                <td style=\"width: 579px; font-family: Arial; font-size: 7.5pt; color: #3c3c3c;\" width=\"579px\">                                                    &copy; 2014 A.B. Data, Ltd. All Rights Reserved.                                                </td>                                            </tr>                                            <tr>                                                <td style=\"width: 579px; font-family: Arial; font-size: 7.5pt; color: #3c3c3c;\" width=\"579px\">                                                    You are receiving this complimentary news service because         you subscribed to A.B.                                                    Data's Class Action News.                                                </td>                                            </tr>                                            <tr>                                                <td style=\"width: 579px; font-family: Arial; font-size: 7.5pt; color: #3c3c3c;\" width=\"579px\">                                                    <a style=\"font-family: Arial; font-size: 7.5pt; color: #3c3c3c;\" href=\"http://abdataclassaction.com/Retain.aspx\">                                                        Retain A.B. Data</a>&nbsp;&nbsp;&nbsp;<a style=\"color: #3c3c3c;\" href=\"http://abdataclassaction.com\">abdataclassaction.com</a>                                                        &nbsp;&nbsp;&nbsp;<a style=\"color: #3c3c3c;\" href=\"http://www.abdataclassaction.com/SubscribeToABDataNews.aspx\">Unsubscribe                                                            from Class Action News</a>                                                </td>                                            </tr>                                        </tbody>                                    </table>                                </td>                            </tr>                        </tbody>                    </table>                </td>            </tr>        </tbody>    </table></body></html>",
    "message_footer": {
        "organization_name": "A.B. Data, Ltd.",
        "address_line_1": "600 A B Data Drive",
        "city": "Milwaukee",
        "state": "WI",
        "postal_code": "53217",
        "country": "USA"
    },
    "sent_to_contact_lists": [
        {
            "id": "2"
        }
    ]
}

 

DaveBerard
Employee
0 Votes

Looks like there is some sort of confusion here.  When I copy/paste your JSON into the same validator, it passes for me.  Looks like something must be changing when you post your JSON in the forums editor.  Can you save the bad JSON into a file and either link it here or send it to us directly at webservices@constantcontact.com.  

 

 

jsonlintpaser.PNG

Dave Berard
Senior Product Manager, Constant Contact
KevinZ24
Brand Strategist
0 Votes

Dave,

 

There is definitely some confusion going on here, because I just ran the JSON from my previous post through the JSONLint validator and got the same error. See below. At any rate, I have attached a text document containing today's raw JSON (for our newsletter). When I run it through the validator, it says Valid JSON. However, I just ran my code again (POST), and I received an error:

 

[{"error_key":"http.status.bad_request","error_message":"Invalid Content."}]

 

 Result of running 4/29 code into the validator:

jsonerror.gif

 

 

 

 

 

Shannon_W
Employee
0 Votes

Hi,

 

Sorry to hear about the issue. The error I got back when trying to post that campaign to my account was:

 

[{"error_key":"http.status.bad_request","error_message":"Your html code contains a url link to&nbsp                             \"http://www.law360.com/classaction/articles/525052/6-tips-for-addressing-cy-pres-awards-in-class-acti...<br />Hint: is there whitespace (space or carriage return) before or after the \"=\" in \"href=\" ? <br />For more information, please see our <a href=\"#\" onClick=\"WindowControl.openHelpWin('http://support2.constantcontact.com/CTCTSupportSiteFAQs'); return false;\">FAQs</a>"}]

 

Indeed, when I found and deleted the white space indicated, I had no problem creating the campaign to my account (changing the list id, and from/reply-to email address). Let me know if you still have issues.

 

Best Regards,

Shannon Wallace

Partner API Support Engineer

 

 

KevinZ24
Brand Strategist
0 Votes

Hi Shannon,

 

Sorry for the delayed response, but your fix worked. I accidently entered some line breaks as I tried to organize the messy HTML. Thanks!

 

-Paul

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