Can anyone tell me which api used for to unlike topic or post. I am able to like post from below api: https://{defaultHost}/post_actions.json. Just for testing i am editing
AI-generated summary
The discussion revolves around unliking a topic or post in Discourse. priyankatiwari is looking for the API to unlike a post and shares the API used for liking a post. Arkshine provides a guide to reverse-engineer the Discourse API and shares the DELETE /post_actions/<post_id> request used for unliking a post.
priyankatiwari observes that the API URL for liking/unliking is https://dev-forum.curiodigitaltx.com/discourse-reactions/posts/28/custom-reactions/heart/toggle.json with a PUT request, but encounters an error. Arkshine suggests removing the Content-Type header, as no form data is required.
The conversation also touches on installing the Reaction plugin for a React Native mobile application. merefield mentions that rewriting the front end of the plugin in React would be necessary for a fully native application.
Here is a guide that will help you in this situation:
If you look at the browser network, you can see the request made when you unlike:
DELETE /post_actions/<post_id> ![]()
The action_summary IDs represent the actions on the post:
1: bookmark
2. like
3. flag off-topic
4. flag inappropriate
5. vote
6. flag notify user
7. flag notify moderator
8. flag spam
I observed through reverse engineering that the API URL used for like/unlike was https://dev-forum.curiodigitaltx.com/discourse-reactions/posts/28/custom-reactions/heart/toggle.json with a PUT request. But I am getting below API failed error
Do we need to pass anything on body as well?
can anyone help me.
I am sure my header is correct because rest all get, post apis are working fine.
my header is
const getHeaders = () => {
return {
“Api-Username”: userName,
“Api-Key”: config.API_KEY,
“Content-Type”: “multipart/form-data”,
};
};
ok
With the Reaction plugin, yes, you’re correct about the request.
I don’t think you need the Content-Type here; you don’t need to provide any form data.
Do you know how to install Reaction plugin for react native mobile application?
You’d have to rewrite the front end of the plugin in React (if fully native and not using web view)


