Commenting on a LinkedIn post using REST API retur

2019-06-22 15:19发布

问题:

I have a linkedin company page.I am trying to post a comment on an already existed post of that page via Linkedin Rest API. Below are the request details :

HTTP METHOD : POST

URL : https://api.linkedin.com/v2/socialActions/urn:li:activity:{activity-id}/comments

HEADERS : Authorization, Content-Type

BODY :

{"actor": "urn:li:organizationBrand:<org id>",
"message": {
    "attributes": [],
    "text": "This is a comment"
}}

The above request is throwing me the below error :

{"message": "com.linkedin.restli.client.RestLiResponseException: Response status 500, serviceErrorMessage: Error creating comment",
"status": 500}

The same request works for me for another linkedin company page. Can you please help me on finding what the issue is?