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-commentAuthentication 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
| Field | Type | Required | Description |
|---|---|---|---|
accountId | string | No | LinkedIn account ID to use. If not provided, uses the default account. |
commentId | string | Yes | ID of the comment to like (same format as used in reply endpoint, from /posts/comments response) |
postUrl | string | No | Optional post URL for referer header (helps with browser simulation) |
companyUrn | string | No | Optional company URN if liking as a company page |
Example
{
"commentId": "7441783492948054016",
"postUrl": "https://www.linkedin.com/feed/update/urn:li:activity:7441028442856251392"
}Responses
| Status | Description |
|---|---|
| 200 | Comment liked successfully |
| 400 | Invalid comment URN format |
| 401 | Unauthorized |
| 500 | Server error |
200 Response Parameters
| Name | Type | Description |
|---|---|---|
success | boolean | |
message | string | |
commentId | string | |
originalCommentId | string | |
accountId | string |
200 Example
{
"success": true,
"message": "Successfully liked comment",
"commentId": "urn:li:comment:(activity:7441028442856251392,7441783492948054016)",
"originalCommentId": "7441783492948054016",
"accountId": "acc_123"
}400 Response Parameters
| Name | Type | Description |
|---|---|---|
success | boolean | |
error | string |
400 Example
{
"success": true,
"error": "example_value"
}401 Response Parameters
| Name | Type | Description |
|---|---|---|
error | string |
401 Example
{
"error": "example_value"
}500 Response Parameters
| Name | Type | Description |
|---|---|---|
error | string | |
success | boolean |
500 Example
{
"error": "example_value",
"success": true
}