简体   繁体   English

在 Linkedin 搜索 Api 中出现 401 错误

[英]Getting 401 error in Linkedin search Api

I am getting error 401 when i trying to use the search api( http://api.linkedin.com/v1/people-search :) provided by the Linkedin.当我尝试使用 Linkedin 提供的搜索 api( http://api.linkedin.com/v1/people-search :) 时,我收到错误 401。 I am successfully able to login in Linkedin by using oauth2 rest api.我可以使用 oauth2 rest api 成功登录 Linkedin。 Have anyone an idea how to do that ?有没有人知道如何做到这一点?

It looks like LinkedIn is no longer keeping this API call ( https://developer.linkedin.com/support/developer-program-transition ): LinkedIn 似乎不再保留此 API 调用( https://developer.linkedin.com/support/developer-program-transition ):

API availability After the grace period expires, several REST API endpoints will no longer be available for general use. API 可用性 宽限期到期后,多个 REST API 端点将不再可供一般使用。 The following endpoints are the only ones that will remain available for use:以下端点是唯一可以继续使用的端点:

  • Profile API — /v1/people/~个人资料 API — /v1/people/~

  • Share API — /v1/people/~/shares共享 API — /v1/people/~/shares

  • Companies API — /v1/companies/{id}公司 API — /v1/companys/{id}

Here you will find the valid API calls https://developer.linkedin.com/docs/signin-with-linkedin在这里您可以找到有效的 API 调用https://developer.linkedin.com/docs/signin-with-linkedin

If your code has the properly auth you could use it:如果您的代码具有正确的身份验证,您可以使用它:

Once you have obtained a valid access token for the user, you can use the following REST API call to retrieve basic profile data for the user:获得用户的有效访问令牌后,您可以使用以下 REST API 调用来检索用户的基本配置文件数据:

https://api.linkedin.com/v1/people/~?format=json https://api.linkedin.com/v1/people/~?format=json

I hope this can help you.我希望这可以帮助你。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM