Linkedin v2 API: Cannot get actor displayImage in socialActions endpoint with projections
Asked Answered
J

1

7

When I'm retrieving social actions of a linkedin share using socialActions endpoint, I'm using projection to get actor info with displayImage~. But it throws following error,

"displayImage!" : { "serviceErrorCode" : 100, "message" : "Not enough permissions to access: GET-playableStreams /assets/C4E03AQH57nd5w5cWUw/mediaArtifactPublicUrls", "status" : 403 }

The query used to get social actions is,

curl 'https://api.linkedin.com/v2/socialActions/urn:li:share:543222277889832/comments?projection=(elements*(*,actor~(*,id,vanityName,profilePicture(displayImage~:playableStreams))))&oauth2_access_token=xxx'

When I'm getting person details using person endpoint, I can get the displayImage~ response. Please anyone help me resolve this.

Jemine answered 9/5, 2018 at 11:0 Comment(0)
U
0

LinkedIn updated the docs' section regarding fetching of the display image:

GET https://api.linkedin.com/v2/me?projection=(id,firstName,lastName,profilePicture(displayImage~:playableStreams))

I've tried it out and it works for me now. Note, that I'm passing the access token through the Authorization HTTP header:

export ACCESS_TOKEN=xxx
curl -s -H "Authorization: Bearer $ACCESS_TOKEN" \
  'https://api.linkedin.com/v2/me?projection=(id,firstName,lastName,maidenName,profilePicture(displayImage~:playableStreams))'
Underbid answered 1/3, 2019 at 9:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.