# Webhooks not working?

**URL:** <https://forums.plex.tv/t/webhooks-not-working/733516>\
**Category:** General Discussions\
**Tags:** webhooks\
**Created:** [August 2, 2021, 7:41pm UTC](https://forums.plex.tv/t/webhooks-not-working/733516 "2021-08-02T19:41:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sub\_o](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/sub_o/32/186656_2.png) [@sub\_o](https://forums.plex.tv/u/sub_o)\
**Post date:** [August 2, 2021, 7:41pm UTC](https://forums.plex.tv/t/webhooks-not-working/733516/1 "2021-08-02T19:41:30Z")

</div>

So I’ve been trying out webhook, but it doesn’t seem to work.

I’ve basically created a simple Sanic python program (similar to node.js or Flask)

```auto
import os
from sanic import Sanic
from sanic.response import text, HTTPResponse
from pprint import pprint

app = Sanic( "PLEX listener" )

@app.route("/", methods=['POST'])
async def handle_plex( request ):
    print( "here" )
    pprint( request.body )
    return text( "hell", status = 200 )

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

```

Which basically just try to print out POST request to /. I’ve tested it using curl, and other REST testing tool, and it works. However it doesn’t work on Plex.

I’ve enabled Webhooks on Settings \>\> Network.  
And on Account \>\> Webhooks, I’ve added

- [http://localhost:32401](http://localhost:32401)
- [http://0.0.0.0:32401](http://0.0.0.0:32401)
- [http://192.168.1.01:32401](http://192.168.1.01:32401) (which is the IP of my server)

What else do you need to enable? When is webhook triggered? I tried it by playing and stopping music

---

<div class="post-metadata">

**Author:** ![sub\_o](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/sub_o/32/186656_2.png) [@sub\_o](https://forums.plex.tv/u/sub_o)\
**Post date:** [August 3, 2021, 12:39am UTC](https://forums.plex.tv/t/webhooks-not-working/733516/2 "2021-08-03T00:39:21Z")

</div>

I forgot to add that the Plex server is running on MacOS Big Sur.

---

<div class="post-metadata">

**Author:** ![aubrey.wodonga](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/aubrey.wodonga/32/175408_2.png) [@aubrey.wodonga](https://forums.plex.tv/u/aubrey.wodonga)\
**Post date:** [August 3, 2021, 1:12am UTC](https://forums.plex.tv/t/webhooks-not-working/733516/4 "2021-08-03T01:12:42Z")

</div>

Sorry, deleted my last reply after I re-read your post. I can see you’ve added the correct settings. Playing and stopping a track should definitely fire the relevant events.

Have you got any firewall or similar that might be getting in the way? Is remote access set up and working correctly? If PMS thinks it’s offline, it won’t send the webhooks.

Assuming both of these aren’t issues, try re-registering the webhook by deleting and readding it.

---

<div class="post-metadata">

**Author:** ![sub\_o](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/sub_o/32/186656_2.png) [@sub\_o](https://forums.plex.tv/u/sub_o)\
**Post date:** [August 3, 2021, 2:32am UTC](https://forums.plex.tv/t/webhooks-not-working/733516/5 "2021-08-03T02:32:07Z")

</div>

I thought firewall was the issue, but I ran that code on the same machine as the server.

I could still `curl -X POST` from another machine, and it works.  
But somehow when playing / stopping tracks, nothing is triggered.  
And I tried those with those 3 endpoints added onto my list of webhooks.

---

<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:** [November 1, 2021, 2:33am UTC](https://forums.plex.tv/t/webhooks-not-working/733516/6 "2021-11-01T02:33:00Z")

</div>

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