create_comment
Add comments to LinkedIn posts using the Official API, supporting text replies and images in nested comments for engagement.
Instructions
Create a comment on a LinkedIn post using the Official API.
Requires "Share on LinkedIn" product enabled in your LinkedIn Developer app.
Args: post_urn: The URN of the post to comment on (e.g., "urn:li:share:123456" or "urn:li:activity:123456") text: The comment text content (max 1250 characters) parent_comment_urn: Optional URN of parent comment for nested replies image_path: Optional image source (only for nested replies) - can be: - Absolute path to local file (JPG, PNG, GIF) - URL to image (http:// or https://) - Base64-encoded image (data:image/png;base64,...)
Returns the created comment details including comment ID.
Note: LinkedIn only allows images in nested comments (replies to other comments), not in top-level comments directly on posts.
Note: Commenting requires the "Community Management API" product from LinkedIn, which has a separate approval process. The "Share on LinkedIn" product only allows creating posts, not comments. If you receive a permission error, you'll need to apply for Community Management API access in your Developer Portal.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| post_urn | Yes | ||
| text | Yes | ||
| parent_comment_urn | No | ||
| image_path | No |