# Webhooks arent reporting application/json in its Content-Type header

**URL:** <https://forums.plex.tv/t/webhooks-arent-reporting-application-json-in-its-content-type-header/178508>\
**Category:** General Discussions\
**Created:** [February 3, 2017, 9:59pm UTC](https://forums.plex.tv/t/webhooks-arent-reporting-application-json-in-its-content-type-header/178508 "2017-02-03T21:59:43Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![dcplaya](https://avatars.discourse-cdn.com/v4/letter/d/85e7bf/32.png) [@dcplaya](https://forums.plex.tv/u/dcplaya)\
**Post date:** [February 3, 2017, 9:59pm UTC](https://forums.plex.tv/t/webhooks-arent-reporting-application-json-in-its-content-type-header/178508/1 "2017-02-03T21:59:43Z")

</div>

I am trying to set up a simple app that listens for Plex’s webhook using Flask/python. When certain players are started, it will dim the lights on my Haiku fans (using another custom driver). My code for flask is

```auto
from flask import Flask, request, jsonify
app = Flask( __name__ )

@app.route('/api/add_message/<uuid>', methods=['GET', 'POST'])
def add_message(uuid):

    #app.logger.debug("JSON received...")
    #app.logger.debug(request.json)

    content = request.get_json()
    print content
    return jsonify({"uuid":uuid})

if __name__ == ' __main__':
    app.run(host= '0.0.0.0', port=8088, debug=True)

```

When Plex posts to my URL, it throws out the JSON because the header isn’t correct. If I manually curl a fake JSON to my url, my little app detects it just fine and prints it back.

Is this something Plex needs to fix or do I have to somehow get around it?

---

<div class="post-metadata">

**Author:** ![elan](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/elan/32/5_2.png) [@elan](https://forums.plex.tv/u/elan)\
**Post date:** [February 3, 2017, 10:45pm UTC](https://forums.plex.tv/t/webhooks-arent-reporting-application-json-in-its-content-type-header/178508/2 "2017-02-03T22:45:20Z")

</div>

@dcplaya ~ remember the POST is a multipart body; the part which has JSON should be the correct type.

---

<div class="post-metadata">

**Author:** ![dcplaya](https://avatars.discourse-cdn.com/v4/letter/d/85e7bf/32.png) [@dcplaya](https://forums.plex.tv/u/dcplaya)\
**Post date:** [February 6, 2017, 4:17pm UTC](https://forums.plex.tv/t/webhooks-arent-reporting-application-json-in-its-content-type-header/178508/3 "2017-02-06T16:17:54Z")

</div>

> @elan said:  
> @dcplaya ~ remember the POST is a multipart body; the part which has JSON should be the correct type.

I skipped over this in the documentation! This is definitely helpful and I can finally get the data to print to my screen. Now I just have to figure out how to separate all the values (which isn’t a Plex issue, just me learning). Thanks elan!

---

<div class="post-metadata">

**Author:** ![elan](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/elan/32/5_2.png) [@elan](https://forums.plex.tv/u/elan)\
**Post date:** [February 6, 2017, 8:54pm UTC](https://forums.plex.tv/t/webhooks-arent-reporting-application-json-in-its-content-type-header/178508/4 "2017-02-06T20:54:39Z")

</div>

You’re a lucky guy to have Haiku fans, I’ve always drooled over those!

---

<div class="post-metadata">

**Author:** ![dcplaya](https://avatars.discourse-cdn.com/v4/letter/d/85e7bf/32.png) [@dcplaya](https://forums.plex.tv/u/dcplaya)\
**Post date:** [February 14, 2017, 1:00pm UTC](https://forums.plex.tv/t/webhooks-arent-reporting-application-json-in-its-content-type-header/178508/5 "2017-02-14T13:00:50Z")

</div>

> @elan said:  
> You’re a lucky guy to have Haiku fans, I’ve always drooled over those!

I just pick up another. Little secret… call them and ask for refurbs. Got it for about half price! Still pricey but better than full price. And their premium lights are awesome too! (I don’t work for them but they are a great company I think) My attempt to make my own API (I forked part of this from another guy) is [github.com/dcplaya/SenseMe/tree/v0.2](https://github.com/dcplaya/SenseMe/tree/v0.2 "https://github.com/dcplaya/SenseMe/tree/v0.2")

---

<div class="post-metadata">

**Author:** ![elan](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/elan/32/5_2.png) [@elan](https://forums.plex.tv/u/elan)\
**Post date:** [February 15, 2017, 9:41pm UTC](https://forums.plex.tv/t/webhooks-arent-reporting-application-json-in-its-content-type-header/178508/6 "2017-02-15T21:41:36Z")

</div>

Wow, thanks for the idea!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [January 7, 2020, 10:41pm UTC](https://forums.plex.tv/t/webhooks-arent-reporting-application-json-in-its-content-type-header/178508/7 "2020-01-07T22:41:16Z")

</div>


