We all started somewhere! Share your experience on the Get Advice: Let's Get Started Sweepstakes thread and be entered to win a $100 credit on your Constant Contact account.

Email Campaign Test Send API

guruk3
Participant

Email Campaign Test Send API

Hi All,

 

I am using following link and content to test the api

https://constantcontact.mashery.com/io-docs

 

i have given api key and token in the top

 

 

 

 

Request Body  { "format":"HTML_AND_TEXT",

"personal_message":"This is a test send of the email campaign message.",

"email_addresses":[ "address1@example.com",

"address2@example.com",

"address3@example.com"

,"address4@example.com",

"address5@example.com" ] }

 

 

getting error as follows

 

 

Response Body  [{ "error_key":"http.header.content_type.invalid",

"error_message":"Invalid content type. API only supports application/json." }]

 

please some one help as soon as possible.

5 REPLIES 5
DaveBerard
Moderator

The error means that there is an incorrectly set HTTP header from the request, specifically Content-Type: application/json.  All you will need to do is set the Content-Type header as described in our documentation here: http://developer.constantcontact.com/docs/developer-guides/general-considerations.html

Dave Berard
Senior Product Manager, Constant Contact

Thanks for your quick reply, I hope this will solve my problem.

 

AmyH9075
Regular Participant

Hi 

 

A quick follow up on this. I've just started exploring CC integration and am new to the schemas. I ran into the same issue but aren't the request headers being generated via the Test call itself? I don't see the ability to change the header in the test page. If I try using my client, i get an authorization error. Can you please point me to the right doc / setup?

 

thanks

Thanks for pointing this out again.  We just updated I/O Docs and it should be all set now.  We had a configuration issue for the test send endpoint. 

Dave Berard
Senior Product Manager, Constant Contact
AmyH9075
Regular Participant

Beautiful. Appreciate the quick turnaround. 

Developer Portal

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

Visit Page