# トピックや投稿の「いいね」を外す方法

**URL:** <https://meta.discourse.org/t/how-to-unlike-a-topic-or-post/311733>\
**Category:** Development\
**Tags:** rest-api\
**Created:** [2024 年 6 月 12 日午前 11:02 UTC](https://meta.discourse.org/t/how-to-unlike-a-topic-or-post/311733 "2024-06-12T11:02:01Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![priyankatiwari](https://avatars.discourse-cdn.com/v4/letter/p/5e9695/32.png) [@priyankatiwari](https://meta.discourse.org/u/priyankatiwari)\
**Post date:** [2024 年 6 月 13 日午後 4:20 UTC](https://meta.discourse.org/t/how-to-unlike-a-topic-or-post/311733/4 "2024-06-13T16:20:57Z")

</div>

いいね/いいね解除に使用されるAPI URLをリバースエンジニアリングしたところ、`https://dev-forum.curiodigitaltx.com/discourse-reactions/posts/28/custom-reactions/heart/toggle.json` でPUTリクエストを使用していることがわかりました。しかし、以下のAPI失敗エラーが表示されます。

 ![Screenshot 2024-06-13 at 21.49.10](https://global.discourse-cdn.com/meta/original/4X/1/4/e/14e173dd79c002d0b9ca72b958145e1db20fd10c.png)  
ボディにも何かを渡す必要がありますか？  
どなたか助けていただけますか。  
他のすべてのGET、POST APIが正常に動作しているため、ヘッダーは正しいと確信しています。  
私のヘッダーは以下の通りです。

```javascript
const getHeaders = () => {

  return {
    "Api-Username": userName,
    "Api-Key": config.API_KEY,
    "Content-Type": "multipart/form-data",
  };
};

```

OK

---

_[View the full topic](https://meta.discourse.org/t/how-to-unlike-a-topic-or-post/311733)._
