# Recibo 403 al dar "No me gusta" a una publicación del usuario

**URL:** https://meta.discourse.org/t/getting-403-for-unlike-a-post-by-the-user/120763
**Category:** Development
**Created:** [19 Junio, 2019 06:25 UTC](https://meta.discourse.org/t/getting-403-for-unlike-a-post-by-the-user/120763 "2019-06-19T06:25:30Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Vishal\_Kaushik](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vishal_kaushik/32/140452_2.png) [@Vishal\_Kaushik](https://meta.discourse.org/u/Vishal_Kaushik)
#### Post date: [19 Junio, 2019 06:25 UTC](https://meta.discourse.org/t/getting-403-for-unlike-a-post-by-the-user/120763/1 "2019-06-19T06:25:30Z")

</div>

I am trying to hit the unlike API on discourse with HTTP, Node.js. I am sending the particular payload :

```
      host: discourseHost,
      port: discoursePort,
      path: '/post_actions/' + parseInt(req.params.post_id),
      method: 'DELETE',
      headers: {
        'Content-Type': 'application/json',
        'Content-Length': Buffer.byteLength(data),
        'Api-Key': DISCOURSE_API_KEY,
        'Api-Username': userData.discourse_username,
        'Accept': 'application/json'
      }

```

But I am getting this as response :

STATUS: 403  
BODY: {“errors”:[“You are not permitted to view the requested resource.”]}

Can anyone suggest me what I need to change in my payload/request.

---

<div class="post-metadata">

### Author: ![Vishal\_Kaushik](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vishal_kaushik/32/140452_2.png) [@Vishal\_Kaushik](https://meta.discourse.org/u/Vishal_Kaushik)
#### Post date: [19 Junio, 2019 06:38 UTC](https://meta.discourse.org/t/getting-403-for-unlike-a-post-by-the-user/120763/2 "2019-06-19T06:38:24Z")

</div>

I tried to hit the discourse API /post\_actions/{id} directly from postman, with the following headers :

```
Content-Type:application/x-www-form-urlencoded
Api-Key:blah blah
Api-Username:eluser2019522
Accept:application/json

```

Still I am getting the response as :

```
{
    "errors": [
        "You are not permitted to view the requested resource."
    ]
} 

```

I am stuck here. Any help will be fine.

---

<div class="post-metadata">

### Author: ![jesus2099](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jesus2099/32/119720_2.png) [@jesus2099](https://meta.discourse.org/u/jesus2099)
#### Post date: [19 Junio, 2019 08:06 UTC](https://meta.discourse.org/t/getting-403-for-unlike-a-post-by-the-user/120763/4 "2019-06-19T08:06:19Z")

</div>

You can cancel a like heart ❤ only within a limited time span.

> [@At what point can you no longer like or unlike a post?](https://meta.discourse.org/t/at-what-point-can-you-no-longer-like-or-unlike-a-post/57141/2):
>
> There’s the “post undo action window mins” setting which controls how long users are allowed to undo recent actions on a post (like, flag, etc). It defaults to 10 minutes. Nope. You gotta spread the heart.

Maybe you are trying to unlike a too old like.

---

<div class="post-metadata">

### Author: ![Vishal\_Kaushik](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vishal_kaushik/32/140452_2.png) [@Vishal\_Kaushik](https://meta.discourse.org/u/Vishal_Kaushik)
#### Post date: [19 Junio, 2019 08:10 UTC](https://meta.discourse.org/t/getting-403-for-unlike-a-post-by-the-user/120763/5 "2019-06-19T08:10:13Z")

</div>

Oh yeah, Thanks a lot. That was the reason. @jesus2099 .

---

<div class="post-metadata">

### Author: ![Vishal\_Kaushik](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vishal_kaushik/32/140452_2.png) [@Vishal\_Kaushik](https://meta.discourse.org/u/Vishal_Kaushik)
#### Post date: [19 Junio, 2019 08:12 UTC](https://meta.discourse.org/t/getting-403-for-unlike-a-post-by-the-user/120763/6 "2019-06-19T08:12:50Z")

</div>

From where I can change this? Can i change this from the admin portal by any chance?

---

<div class="post-metadata">

### Author: ![Chaboi\_3000](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chaboi_3000/32/163015_2.png) [@Chaboi\_3000](https://meta.discourse.org/u/Chaboi_3000)
#### Post date: [19 Junio, 2019 08:34 UTC](https://meta.discourse.org/t/getting-403-for-unlike-a-post-by-the-user/120763/7 "2019-06-19T08:34:53Z")

</div>

You can change it in the `post undo action window mins` site setting located here: `http://forum.example.com/admin/site_settings/category/all_results?filter=post%20undo%20action%20window%20mins`. By default, it should be 10 minutes.

 ![57%20PM](https://global.discourse-cdn.com/meta/original/3X/7/9/79dfb6d5acaadb81d3fe690d57937d74efad3b66.png)
