# \`liked\` field in Latest.json is always null even when a post is Liked

**URL:** https://meta.discourse.org/t/liked-field-in-latest-json-is-always-null-even-when-a-post-is-liked/151848
**Category:** Support
**Created:** [18 mei 2020 om 16:01 UTC](https://meta.discourse.org/t/liked-field-in-latest-json-is-always-null-even-when-a-post-is-liked/151848 "2020-05-18T16:01:47Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![afrin](https://avatars.discourse-cdn.com/v4/letter/a/bcef8e/32.png) [@afrin](https://meta.discourse.org/u/afrin)
#### Post date: [18 mei 2020 om 16:01 UTC](https://meta.discourse.org/t/liked-field-in-latest-json-is-always-null-even-when-a-post-is-liked/151848/1 "2020-05-18T16:01:48Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [18 mei 2020 om 16:21 UTC](https://meta.discourse.org/t/liked-field-in-latest-json-is-always-null-even-when-a-post-is-liked/151848/2 "2020-05-18T16:21:38Z")

</div>

Are you requesting the `/latest.json` as an authenticated user with the auth headers?

Are you liking the OP ?

---

<div class="post-metadata">

### Author: ![afrin](https://avatars.discourse-cdn.com/v4/letter/a/bcef8e/32.png) [@afrin](https://meta.discourse.org/u/afrin)
#### Post date: [18 mei 2020 om 16:22 UTC](https://meta.discourse.org/t/liked-field-in-latest-json-is-always-null-even-when-a-post-is-liked/151848/3 "2020-05-18T16:22:47Z")

</div>

Yes I am requesting `/latest.json` as an authenticated user with auth headers

---

<div class="post-metadata">

### Author: ![chrisbai2021](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chrisbai2021/32/307437_2.png) [@chrisbai2021](https://meta.discourse.org/u/chrisbai2021)
#### Post date: [8 juni 2023 om 20:49 UTC](https://meta.discourse.org/t/liked-field-in-latest-json-is-always-null-even-when-a-post-is-liked/151848/4 "2023-06-08T20:49:58Z")

</div>

Did you find a solution? Seeing the same issue…

---

<div class="post-metadata">

### Author: ![chrisbai2021](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chrisbai2021/32/307437_2.png) [@chrisbai2021](https://meta.discourse.org/u/chrisbai2021)
#### Post date: [8 juni 2023 om 21:14 UTC](https://meta.discourse.org/t/liked-field-in-latest-json-is-always-null-even-when-a-post-is-liked/151848/5 "2023-06-08T21:14:18Z")

</div>

need to add track\_visit + forceLoad as query params when loading the topic like this:

```plaintext
https://xxx.discourse.org/t/1026.json?track_visit=true&forceLoad=true

```
