如何使用 linkedin Rest API 从个人资料 url 获取 public 个人资料详细信息

How to get public profile details from profile url using linkedin Rest API

我试图通过使用 linkedin public 个人资料来获取用户的全部信息 url 但我得到的是名字、姓氏和 ID 作为响应。

如何获取完整的详细信息。

我已经在 linkedin 控制台上试过了

https://api.linkedin.com/v1/people/url=https%3a%2f%2fwww.linkedin.com%2fin%2fashishmishraoft?format=json

Response
{
  "firstName": "Ashish",
  "headline": "Sr PHP Developer at Myapp Generation.",
  "id": "STaDeFHBBN",
  "lastName": "Mishra"
}

LinkedIn does not return all possible member profile fields that are available to you by default. There is a limited selection of additional member fields that are also available to you which may be relevant to your application. Refer to the Basic Profile Fields page for a complete list of the basic member profile fields.

The following example demonstrates how to customize your API call to request specific member profile fields that you wish to be returned during the Sign In with LinkedIn workflow:

GET https://api.linkedin.com/v1/people/~:(id,num-connections,picture-url)?format=json

sample api response:

{
    "id": "1R2RtA",
    "numConnections": 42,
    "pictureUrl": "https://media.licdn.com/mpr/mprx/…"
} 

https://developer.linkedin.com/docs/signin-with-linkedin

您无法从 api 中的基本链接获取 full_profile 信息。为了获得 full_profile 信息,您必须成为 linked in 的合作伙伴。

https://developer.linkedin.com/partner-programs

如果您想获取 r_basicprofile 和 r_emailaddress 的完整信息,请使用访问令牌

向以下 url 发出获取请求

https://api.linkedin.com/v1/people/~:(email-address,id ,first-name ,last-name ,maiden-name , formatted-name ,拼音-first-name ,拼音-last-name ,formatted-phonetic-name ,标题 ,位置 ,行业 ,current-share ,num-connections ,num-connections-capped ,summary ,specialties ,positions ,picture-url ,picture-urls::(original) ,site-standard-profile-request ,api-standard-profile-request ,public-profile-url)?oauth2_access_token={YOUR_ACCESS_TOKEN}&format=json