> ## Documentation Index
> Fetch the complete documentation index at: https://docs.supahub.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Like Comment

> Like a comment.

<ParamField body="POST" type="method" />

<ParamField body="/comments/like_comment" type="path" />

### Body Parameters

<ParamField body="commentId" type="string" required>
  ID of the comment being liked.
</ParamField>

<ParamField body="email" type="string | undefined">
  Email of the user liking the comment (if applicable).
</ParamField>

<ParamField body="userId" type="string | undefined">
  UserID of the user liking the comment (if applicable).
</ParamField>

<RequestExample>
  ```javascript curl theme={null}
  // Replace API_KEY with your api key
  curl --location --request POST 'https://api.supahub.com/api/v1/comments/like_comment' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --header 'Authorization: Bearer API_KEY' \
  --data-urlencode 'commentId=clxip0nbm007h30g2beijccxg' \
  --data-urlencode 'email=useremail@example.com'
  ```

  ```javascript fetch theme={null}
  const myHeaders = new Headers();
  myHeaders.append("Content-Type", "application/x-www-form-urlencoded");
  myHeaders.append("Authorization", "Bearer API_KEY"); // Replace API_KEY with your api key

  const urlencoded = new URLSearchParams();
  urlencoded.append("commentId", "clxip0nbm007h30g2beijccxg");
  urlencoded.append("email", "useremail@example.com");

  const requestOptions = {
    method: "POST",
    headers: myHeaders,
    body: urlencoded,
    redirect: "follow",
  };

  fetch("https://api.supahub.com/api/v1/comments/like_comment", requestOptions)
    .then((response) => response.text())
    .then((result) => console.log(result))
    .catch((error) => console.error(error));
  ```

  ```javascript axios theme={null}
  const axios = require('axios');
  const qs = require('qs');
  let data = qs.stringify({
    'commentId': 'clxip0nbm007h30g2beijccxg',
    'email': 'useremail@example.com'
  });

  let config = {
    method: 'post',
    maxBodyLength: Infinity,
    url: 'https://api.supahub.com/api/v1/comments/like_comment',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': 'Bearer API_KEY' // Replace API_KEY with your api key
    }
    data : data
  };

  async function makeRequest() {
    try {
      const response = await axios.request(config);
      console.log(JSON.stringify(response.data));
    }
    catch (error) {
      console.log(error);
    }
  }

  makeRequest();
  ```

  ```python python theme={null}
  import requests

  url = "https://api.supahub.com/api/v1/comments/like_comment"

  payload = 'commentId=clxip0nbm007h30g2beijccxg&email=useremail%40example.com'

  headers = {
    'Content-Type': 'application/x-www-form-urlencoded',
    'Authorization': 'Bearer API_KEY' # Replace API_KEY with your key.
  }

  response = requests.request("POST", url, headers=headers, data=payload)

  print(response.text)
  ```
</RequestExample>
