Is it possible to find who Reacted via the API?

This installed and runs well on my little forum - thanks!!

I wonder - is it possible to get information on who reacted and how to a post via the API? For example, we can generate a JSON response detailing who “likes” the original post in this topic via the following API request:

https://meta.discourse.org/post_action_users.json?post_action_type_id=2&id=904584

I’m wondering if we can get similar information broken down by reaction type via the API?

I’m aware that we can set which reaction corresponds to a “like” via the “discourse reactions reaction for like” item in the plugin settings and I’m guessing that there’s no further way to distinguish between the reactions, but I thought I’d check.

Context

As a University Professor, I use small Discourse instances as discussion forums in my classes. I often make assigned topics that students are required to respond to for points. Students know they get the points, when they get a “like” from me. The best part is that I can use the API to automatically tally the points. It would be nice to associate different point levels with different reactions.

8 Likes

Hi, yes you can do this:

GET /discourse-reactions/posts/:post_id/reactions-users.json
8 Likes

Yes, that’s exactly what I was looking for: https://discourse.marksmath.org/discourse-reactions/posts/120/reactions-users.json

Thanks!

7 Likes

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