Webhooks post does not correctly identify the Content-Type header as application/json

Server Version#: 1.28.1.6104
Player Version#:

I’ve set up an API endpoint in AWS API Gateway to trigger an AWS Lambda function so I can control some home automation via webhooks. Unfortunately, when AWS API Gateway receives the POST data from the webhook, the Content-Type header isn’t set to application/json. By default, API Gateway takes the body data for any request which the Content-Type header hasn’t been set and base64 encodes the data instead of treating the data like JSON data. Ideally Plex Media Server posts this webhook data with the correct Content-Type header set when sending JSON data so the data can be more easily handled by the API receiving the data.

Plex started sending multipart/form-data webhooks last year (not sure exactly which release) which breaks basically every standard webhook receiver. So far, there doesn’t seem to be anything you can do to switch it back to a standard application/json request aside from writing yourself a local proxy app that extracts the json part of the form-data and then forwards that to whatever receiver you want.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.