18

I'm trying to figure out how to access any company profile on LinkedIn. For example, the REST endpoint API for LinkedIn itself is:

https://api.linkedin.com/v1/companies/1337?format=json

with the sample response of:

{
  "id": 1337,
  "name": "LinkedIn"
}

However, after authenticating with OAuth2 with rw_company_admin enabled, my app returns:

{
  "errorCode": 0,
  "message": "Member 206xxxxxx does not have permission to get company 1337",
  "requestId": "G6LNMCEZO8",
  "status": 403,
  "timestamp": 1432358171348
}

This worked up until very recently.

The documentation does note that "In order to perform any of the company page management API calls below, the authenticated LinkedIn user making the requests must be an administrator of the target company." Confusingly, it also says that "The following endpoints are the only ones that will remain available for use... Companies API — /v1/companies/{id}".

However, my goal isn't to manage a company as an admin, it's to show a user a brief output of the company. How can I get company info?

Hooked
  • 84,485
  • 43
  • 192
  • 261

3 Answers3

13

It looks like they turned that feature off.

See https://developer.linkedin.com/support/developer-program-transition

New requirement for Companies API

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.

Your API call will return a 403 Forbidden error if you do not have the appropriate admin permission to interact with the target company.

And in the first line,

On February 12th 2015 we announced a series of changes to our developer program. These changes have now begun to take affect and will be rolled out to the entire LinkedIn application base between May 12th - May 19th, 2015.

So we are out of luck.

Kenny John Jacob
  • 1,188
  • 8
  • 21
mmx73
  • 972
  • 1
  • 8
  • 19
  • 15
    So you have to be the administrator of the company, _just to get info about the company_? I would assume that the company info is most useful to _people who **aren't** administrators_! – Hooked May 28 '15 at 14:57
  • @Hooked : I agree and I am screwed as well. Maybe you can get the same information via Facebook API from the according facebook page ? (But I am not sure about the facebook API either they have a rather complicated rights system too ) – mmx73 May 28 '15 at 15:26
  • Note that you have to be added as an administrator of the *company page* not the developer application. Easy to miss. – Ben Jun 25 '15 at 23:20
  • Also if anyone had the same problem check to make sure you are searching by id(usually 7 letters) and not 'universal_name'. Thats what caused it for me – Leon May 09 '16 at 05:22
6

For accessing the company details from LinkedIn you must make a authenticated request(You must be the administrator of the company). For authenticated calls follow this link. https://developer.linkedin.com/docs/oauth2#!

Anyway, you must have the permission rw_company_admin to access the company details. For that, you must check Default Application Permissions in your App settings and also important to note that when you request for an Authorization Code you must specify the scope.

Use this method to get an authorization code for a company

https://www.linkedin.com/oauth/v2/authorization?response_type=code&client_id=123456789&redirect_uri=https%3A%2F%2Fwww.example.com%2Fauth%2Flinkedin&state=987654321&scope=rw_company_admin

Sanoop PK
  • 100
  • 2
  • 10
0

I had issues with this as well even though I was definitely a company admin. Once I added that company as my current place of work on my profile, the API started to respond as expected.

Genesis
  • 8,038
  • 3
  • 21
  • 22