Mayank Sitapara
Mayank Sitapara

Reputation: 35

LinkedIn API request fails with "Resource reactions does not exist"

{
    "serviceErrorCode": 0,
    "message": "Resource reactions does not exist",
    "status": 404
}

Getting above error when trying to retrieve reactions on share. Following this request according to documentation.

GET "https://api.linkedin.com/v2/reactions/(entity:{entityUrn})?q=entity&sort={sortOrder}"

My request

GET 'https://api.linkedin.com/v2/reactions/urn:li:share:6655188984098103296?q=share&sort=desc&oauth2_access_token=<access-token>' 

What am i doing wrong here? Post share has reaction to it. I'm unable to understand what they mean by entity and q. I've tried all forms of sort order like abbreviations also. Any help is appreciated.

Upvotes: 2

Views: 3376

Answers (1)

HSC
HSC

Reputation: 36

You need to escape the entityUrn. https://learn.microsoft.com/en-us/linkedin/shared/api-guide/concepts/protocol-version

You also need to set the X-Restli-Protocol-Version to 2.0.0

So your request might look like:

https://api.linkedin.com/v2/reactions/(entity:urn%3Ali%3Ashare%3A1234567)?q=entity

Upvotes: 2

Related Questions