Facebook Pixel
ApiLinkedin posts

Like a comment

Like an existing comment on a LinkedIn post. Sends a pre-signal to LinkedIn before the actual like action for realistic engagement simulation.

POST/like-comment
Authentication requiredPosts

Code Examples

curl -X POST 'https://api.connectsafely.ai/linkedin/like-comment' \
-H 'Authorization: Bearer <your_api_key>' \
-H 'Content-Type: application/json' \
-d '{"commentId":"7441783492948054016"}'

Parameters

No parameters.

Request Body

FieldTypeRequiredDescription
accountIdstringNoLinkedIn account ID to use. If not provided, uses the default account.
commentIdstringYesID of the comment to like (same format as used in reply endpoint, from /posts/comments response)
postUrlstringNoOptional post URL for referer header (helps with browser simulation)
companyUrnstringNoOptional company URN if liking as a company page

Example

{
  "commentId": "7441783492948054016",
  "postUrl": "https://www.linkedin.com/feed/update/urn:li:activity:7441028442856251392"
}

Responses

StatusDescription
200Comment liked successfully
400Invalid comment URN format
401Unauthorized
500Server error

200 Response Parameters

NameTypeDescription
successboolean
messagestring
commentIdstring
originalCommentIdstring
accountIdstring

200 Example

{
  "success": true,
  "message": "Successfully liked comment",
  "commentId": "urn:li:comment:(activity:7441028442856251392,7441783492948054016)",
  "originalCommentId": "7441783492948054016",
  "accountId": "acc_123"
}

400 Response Parameters

NameTypeDescription
successboolean
errorstring

400 Example

{
  "success": true,
  "error": "example_value"
}

401 Response Parameters

NameTypeDescription
errorstring

401 Example

{
  "error": "example_value"
}

500 Response Parameters

NameTypeDescription
errorstring
successboolean

500 Example

{
  "error": "example_value",
  "success": true
}