Is it possible to add a user action event listener?


I run a little site that uses Discourse as a forum.

I’m adding a little bit of gamification to the site, in the form of points. Points are simply a total of various actions the user can take on the site, as well as actions the user can take on the forum: things uploaded to the site + comments left on the site + topics posted on the forum + likes received on the forum, etc.

Right now, I use the Discourse api (/users/UserName.json) to get those actions. I simply poll this every 5 seconds to detect changes to the user’s points.

I know this is stupid, and I’d like to use long polling instead. I can set that up for actions taken on my site, but the question is: how do I detect when a user takes an action on the forum?

My googling shows up various discussions on “web hooks”, but I can’t tell if there’s an “official” way to implement this.

Just to be clear, what I’m hoping for in the best case is a way that I can go to the admin panel, then specify urls on my site that discourse will post to when a user takes a specific action (such as starting a topic or receiving a like).

Using Discourse for Comments on Legacy Site

Sorry for the bump, but does anybody have any input on this? Or suggestions on how I could improve the question?