Like / comment a post
The Linked API allows you to like or comment on a LinkedIn post programmatically. Below is an example of how to perform these actions using POST
requests.
Like a Post
Endpoint
POST /v1/posts/like
Parameters
postUrl
(required, string): The URL of the LinkedIn post to like.
Example
curl -X POST https://api.linkedapi.io/v1/posts/like \
-H "Content-Type: application/json" \
-H "x-api-token: your-api-token-here" \
-H "account-token: your-account-token-here" \
-d '{
"postUrl": "https://www.linkedin.com/posts/some-post-id/"
}'
Comment a Post
Endpoint
POST /v1/posts/comment
Parameters
postUrl
(required, string): The URL of the LinkedIn post to comment on.comment
(required, string): The content of the comment.
Example
curl -X POST https://api.linkedapi.io/v1/posts/comment \
-H "Content-Type: application/json" \
-H "x-api-token: your-api-token-here" \
-H "account-token: your-account-token-here" \
-d '{
"postUrl": "https://www.linkedin.com/posts/some-post-id/",
"comment": "Great post! Thanks for sharing."
}'
Response
{
"status": "Action Successful"
}
Errors
400 Bad Request
: Invalid or missing parameters.401 Unauthorized
: Missing or invalid authorization token.404 Not Found
: Post not found.