Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Viewer don't have permission to the ADMIN_ONLY VisibilityReduction" when retrieving company details

Tags:

linkedin-api

We have had code integrated with the LinkedIn API running successfully for years, and most of our tens of thousands of users have no problems with our integration, which involves connecting LinkedIn profiles and pages and sharing content to them.

As you'd expect, when the user goes through the OAuth process, we retrieve the list of companies connected to their account. Then we iterate over these companies to retrieve details by making a request to https://api.linkedin.com/v2/organizations/[id]?projection=(id,vanityName,localizedName,logoV2(cropped~:playableStreams) using the user's access token.

We now have two instances of an error occurring with the above request:

Viewer don't have permission to the ADMIN_ONLY VisibilityReduction for urn:li:organization:xxxx

It doesn't matter which fields we do or don't request. The API says these users have the ADMINISTRATOR role on said pages.

Any insight into the source of this problem would be greatly appreciated.

like image 261
shaneiseminger Avatar asked Nov 07 '22 03:11

shaneiseminger


1 Answers

You are using wrong API endpoint.

Try below endpoint:

https://api.linkedin.com/v2/organizationsLookup?ids[0]=1000&projection=(results*(localizedName,id,name))

like image 177
Vinay Kumar Avatar answered Nov 25 '22 10:11

Vinay Kumar