Derek Joseph Olson
Derek Joseph Olson

Reputation: 778

LinkedIn API V2 - How to get profile photo used for an organization?

I'm using the endpoint https://api.linkedin.com/v2/organizationalEntityAcls?q=roleAssignee&role=ADMINISTRATOR&projection=(elements*(organizationalTarget~(localizedName)))&oauth2_access_token={{access_token}} to get all organizations for a user. I tried different projection fields but still wasn't able to get the profile photo. Is there a way to change projection to get photo or is there possibly another endpoint to get this?

Upvotes: 2

Views: 2978

Answers (3)

user1190132
user1190132

Reputation: 546

Ervin Kalemi's answer is actually right if you want to get photos for all organisations instead of a single organization, but the URL is not fully correct at the end. This URL will work:

https://api.linkedin.com/v2/organizationalEntityAcls?q=roleAssignee&role=ADMINISTRATOR&state=APPROVED&projection=(elements*(organizationalTarget~(id,localizedName,logoV2(original~:playableStreams))))

Upvotes: 0

Ervin Kalemi
Ervin Kalemi

Reputation: 607

It is possible actually. This is the call that worked for me.

https://api.linkedin.com/v2/organizationalEntityAcls?q=roleAssignee&role=ADMINISTRATOR&state=APPROVED&projection=(elements*(organizationalTarget~(id,localizedName,logoV2(original~:playableStreams))))")

Upvotes: 1

Jonathan Lee
Jonathan Lee

Reputation: 326

I could not figure out a way to get back a logo with the organizationalEntityAcls endpoint. I do not believe its available.

Instead I called the organizations end point with the ids send back from the above.

NOTE: organizationId is just the id not the full URN.

https://api.linkedin.com/v2/organizations/{organizationId}?projection=(logoV2(original~:playableStreams)),

Upvotes: 7

Related Questions