Skip to content

Like Comment

POST /public/content/{contentId}/like/{commentId}

Like a comment on the platform. This endpoint adds a like or reaction to a specific comment on the associated social media platform. The action will be performed using the selected connected account.

WARNING

Like comment is only supported on the following platforms: Facebook, TikTok, and LinkedIn.

Endpoint Details

  • Authentication: Basic Auth (Authorization: Basic Base64(AccessKey:SecretKey))
  • Access Tier: Gold+

Parameters

ParameterTypeInRequiredDescription
contentIdstringpathYesThe unique identifier of the content containing the comment.
commentIdstringpathYesThe unique identifier of the comment to like.
accountIdstringqueryYesThe account used to perform the like action.

Example Request

bash
curl -X POST "https://api.repliz.com/public/content/113958387982006_942538351814577/like/113958387982006?accountId=680affa5ce12f2f72916f67e" \
  -H "Authorization: Basic $(echo -n 'YOUR_ACCESS_KEY:YOUR_SECRET_KEY' | base64)"
javascript
import axios from "axios";

const contentId = "113958387982006_942538351814577";
const commentId = "113958387982006";

const response = await axios.post(
  `https://api.repliz.com/public/content/${contentId}/like/${commentId}`,
  null,
  {
    params: {
      accountId: "680affa5ce12f2f72916f67e",
    },
    auth: {
      username: "YOUR_ACCESS_KEY",
      password: "YOUR_SECRET_KEY",
    },
  },
);

console.log(response.status);
javascript
const credentials = btoa("YOUR_ACCESS_KEY:YOUR_SECRET_KEY");

const contentId = "113958387982006_942538351814577";
const commentId = "113958387982006";

const response = await fetch(
  `https://api.repliz.com/public/content/${contentId}/like/${commentId}?accountId=680affa5ce12f2f72916f67e`,
  {
    method: "POST",
    headers: {
      Authorization: `Basic ${credentials}`,
    },
  },
);

console.log(response.status);

Response

json
// No content returned on success
json
// Account Not Found
{
  "code": 404,
  "message": "account not found"
}

// Comment Not Found
{
  "code": 404,
  "message": "comment not found"
}
json
{
  "code": 401,
  "message": "unauthorized"
}