Cory Forseth
Cory Forseth

Reputation: 31

LinkedIn API returns 403 when requesting companies list

We use the LinkedIn API to list companies that a user admins.

We have our App set to get r_fullprofile and rw_company_admin when the user grants permission.

We're trying to list all of the companies the user has admin access to via: http://api.linkedin.com/v1/companies:(id,name,square-logo-url)?is-company-admin=true

<error>
    <status>403</status>
    <timestamp>1432323149224</timestamp>
    <request-id>XXXXXXXXXX</request-id>
    <error-code>0</error-code>
    <message>Member [user id] does not have permission to get companies as admin.</message>
</error>

According to the Manage Company Pages docs, as long as we have the rw_company_admin scope, we should be able to call this endpoint.

I've read through the Developer Program Transition docs (https://developer.linkedin.com/support/developer-program-transition) but it doesn't seem to affect this usage of the API.

ETA: This has been flagged as a possible duplicate of LinkedIn API unable to view _any_ company profile

That question is about fetching details for a single company (which the user may or may not administrate). My question is about listing companies that the user specifically does administrate.

Upvotes: 3

Views: 2450

Answers (2)

Shivangi Shroff
Shivangi Shroff

Reputation: 11

I faced the same problem and the problem was with the initial authorization code. You should mention the scope=rw_company_admin while doing the initial redirect URL call. Something like this -

https://www.linkedin.com/oauth/v2/authorization?response_type=code&client_id=your_client_id&redirect_uri=https%3A%2F%2Fwww.google.com/&state=12345&scope=rw_company_admin%20r_emailaddress%20w_share%20r_basicprofile

Upvotes: 0

Deepak Hasani
Deepak Hasani

Reputation: 33

According to new api changes user should be administrator of target company. Read this .

All calls to Companies API endpoints will require the authenticated user to be flagged as an administrator of the LinkedIn Company Page that is the target of the API call. You become the administrator of a page when you create it. If the page already exists, you will have to contact the existing administrator to grant admin access to other LinkedIn members.

Upvotes: 1

Related Questions