cancel
Showing results for 
Search instead for 
Did you mean: 
Constant Contact wants to help you succeed! We’re celebrating our professional service programs on the Constant Contact Community this month and you have a chance to try one of the services for free! Learn more.

415 unsupported media type on integration that has been working for over a year.

Highlighted
Occasional Contributor

415 unsupported media type on integration that has been working for over a year.

I've had my integration working for about a year, nothing has changed in my code and around December 18th 2014 people using my software started getting 415 unsupported media type (as showing in mashery) error messages when trying to create a new list. The json and api key work when doing the api test but no longer thru my code. 

 

When I get all the lists thru the api it returns all the lists, It's when doing the creation doign a json post via http of the list that the error happens. Again nothing in my code has changed for a year.

 

 

The full message return from the api call is as follows: [{"error_key":"http.header.content_encoding.invalid","error_message":"Invalid content encoding type. API only supports gzip."}]

 

any help would be appreciated.

Tags (2)
3 REPLIES 3
Honored Contributor

Re: 415 unsupported media type on integration that has been working for over a year.

Hello,

 

The error message you are seeing is likely caused by a content encoding header that is being sent with the API requests from your application. The first step in debugging that is to make sure that if you are sending a content-encoding that it is specified as gzip, and the content is properly compressed. I do also want to note that no content-encoding header is required to use the API.

 

This has only recently appeared because we are adding support for gzip encoding of content to allow optimization for mobile applications that implement our API.

 

If there is any more information I can provide, please let me know!

 

Sincerely,

Elijah G.
API Support Engineer
Occasional Contributor

Re: 415 unsupported media type on integration that has been working for over a year.

I am not adding any content-encodeing for gzip. and also I would like to reiterate that this code has been working for nearly a year and only just started giving that error. So the question is what has changed on your end.

 

I did do some trouble shooting to see if adding gzip would do anything in fixing this but now I get the error

invalid.payload.format with error message of - payload is not in right format

 

but again I specifically have gzip turned off for over a year and it is just a standard json post. My accesstoken works and I know the url is correct.

 

thanks again for any help that you can point me to in seeing what could be causing this.

 

Honored Contributor

Re: 415 unsupported media type on integration that has been working for over a year.

Hello,

 

The reason you are seeing the error is that we are adding support for gzip encoded content and as a result we are now using the cotent-encoding header. 

 

To troubleshoot further there are a couple things that can be done:

 

1. Make sure that the content-encoding header is not present in the HTTP request.

2. If there is no content-encoding header present, then it would be best if you can provide a very detailed snapshot of the API request that is being sent. In order to do this, I would suggest sending the information to webservices@constantcontact.com so that it can be left intact without publicizing information such as your access token.

 

Best Regards,

 

Elijah G.
API Support Engineer