Not getting company info

匆匆过客 提交于 2019-12-12 04:03:37

问题


I am new to this linkedin api. I have made a small example which is working when I am using the keyword search by using the following url:

https://api.linkedin.com/v1/company-search:(companies:(id,name,universal-name,website-url,industries,status,logo-url,blog-rss-url,twitter-id,employee-count-range,specialties,locations,description,stock-exchange,founded-year,end-year,num-followers))?keywords={IBM}&oauth2_access_token=<access Token>

But when I am searching any company info by using the email-domain search then it is giving me 403 error:

<error>
  <status>403</status>
  <timestamp>1432820120642</timestamp>
  <request-id>XLWN5Y7T7R</request-id>
  <error-code>0</error-code>
  <message>Member 385883298 does not have permission to get company 66028</message>
</error>

I am using the following url for this:

https://api.linkedin.com/v1/company-search:(companies:(id,name,universal-name,website-url,industries,status,logo-url,blog-rss-url,twitter-id,employee-count-range,specialties,locations,description,stock-exchange,founded-year,end-year,num-followers))?email-domain=ibm.com&oauth2_access_token=<acess Token>

So as you have posted your answer which is related to this problem I guess you are saying that I have to be the administrator for the company page for which I am searching. As like in my above url i.e. email-domain=ibm.com. If I am wrong or not getting the things, please guide me.

Thanks


回答1:


As part of the recent changes to the LinkedIn API - you are required to be the administrator of the company you are making API calls on behalf of. As a result, the company search calls are no longer openly available.

You can make a call to check whether the authenticated user is an Administrator of a given company like this:

https://api.linkedin.com/v1/companies/{Insert CompanyID here}/relation-to-viewer/is-company-share-enabled?format=json

This will return a boolean value. If true, you're good to go. If false, you'll need to get an existing company admin to grant the user company administrator status using the tools available on www.linkedin.com



来源:https://stackoverflow.com/questions/30510999/not-getting-company-info

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!