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":"urn:li:comment:(activity:7441028442856251392,7441783492948054016)"}'

Parameters

No parameters.

Request Body

FieldTypeRequiredDescription
accountIdstringNoLinkedIn account ID to use. If not provided, uses the default account.
commentIdstringYesURN of the comment to like. Supports formats: urn:li:comment:(activity:...,...), urn:li:fsd_comment:(...,urn:li:activity:...)
postUrlstringNoOptional post URL for referer header (helps with browser simulation)
companyUrnstringNoOptional company URN if liking as a company page

Example

{
  "commentId": "urn:li:comment:(activity:7441028442856251392,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
successbooleanWhether the like was successful
messagestringStatus message
commentIdstringThe transformed comment URN
originalCommentIdstringThe original comment ID as provided
accountIdstringThe account ID used

200 Example

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