I tried using the below API to like a post:
POST : baseUrl/post_actions
Body - {"id": 123,"post_action_type_id": 2,"flag_topic": false}
When I call latest.json, the response has liked: null for the post which is liked.
When I like the same post from Discourse Web UI, I am able to get liked: true in latest.json.
Am I missing something in the above LIKE API that I am using? I just tried to replicate the API called from Discourse Web UI.