The Profile API returns a member's LinkedIn profile. You can use this call to return one of two versions of profile:
Use the public profile in cases where you know the public profile URL and you want to make sure that the end user can always see the profile no matter the visibility rules. To get the public profile URL, you might have asked a user to use his/her profile on your site and retrieved that user's public profile URL for later use.
Use the standard profile in cases where you want to show a profile and include the relationship information. It will include the distance between the two users. However, there are visibility rules determining the level of detail any two profiles can see, so if you don't need this relationship information, its better to use the public profile.
There are several ways to identify the user profile you want to return:
By default, only the following fields are returned for a profile request:
| Field | Parent Node | Description |
|---|---|---|
| first-name | person | the member's first name |
| last-name | person | the member's last name |
| headline | person | the member's headline (often "Job Title at Company") |
| site-standard-profile-request/url | person | the URL to the member's authenticated profile on LinkedIn (requires a login to be viewed, unlike public profiles) |
To request any fields beyond this limited set, you must use Field Selectors.
See the Profile Fields document for a full list of supported fields.
The URL to retrieve the standard and public profiles are the same. To return a public profile, simply add :public to the end of the profile. Without that, the call will return a standard profile.
This is the XML you will see when making a call to get the current user's profile. The profile for the access token will be used. A successful call returns an XML document in the following format:
<person>
<id>
<first-name />
<last-name />
<headline>
<location>
<name>
<country>
<code>
</country>
</location>
<industry>
<distance>
<relation-to-viewer>
<distance>
</relation-to-viewer>
<num-recommenders>
<current-status>
<current-status-timestamp>
<connections total="" >
<summary/>
<positions total="">
<position>
<id>
<title>
<summary>
<start-date>
<year>
<month>
</start-date>
<is-current>
<company>
<name>
</company>
</position>
<educations total="">
<education>
<id>
<school-name>
<degree>
<start-date>
<year>
</start-date>
<end-date>
<year>
</end-date>
</education>
</education>
</educations>
<member-url-resources>
<member-url>
<url>
<name>
</member-url>
<api-standard-profile-request>
<url>
<headers>
<http-header>
<name>
<value>
</http-header>
</headers>
</api-standard-profile-request>
<site-standard-profile-request>
<url>
</site-standard-profile-request>
<picture-url>
</person>This is the XML you will see when making a call to get a profile other than the current user. This could include a first, second, third degree, or out of network profile. A successful call returns an XML document in the following format:
<person>
<id>
<first-name>
<last-name>
<headline>
<location>
<name>
<country>
<code>
</country>
</location>
<industry>
<distance>
<num-recommenders>
<current-status>
<current-status-timestamp>
<connections total="" >
<summary/>
<positions total="">
<position>
<id>
<title>
<summary>
<start-date>
<year>
<month>
</start-date>
<is-current>
<company>
<name>
</company>
</position>
</positions>
<member-url-resources>
<member-url>
<url>
<name>
</member-url>
<api-standard-profile-request>
<url>
<headers>
<http-header>
<name>
<value>
</http-header>
</headers>
</api-standard-profile-request>
<site-standard-profile-request>
<url>
</site-standard-profile-request>
<picture-url>
</person>
For your convenience, the XML returns two URLs that let you easily display a standard profile.
If you would like to leave a comment, please log in with your LinkedIn account credentials.
We are looking at update APIs for the profile but this is longer term work, so not right around the corner.
We don't currently send out phone numbers with the profiles.
Hi,
Given that my users already have a profile on my application, is there an API I can use to automatically create an account on LinkedIn on their behalf by posting the records I have in my Database (matching fields by fields) ?
Say some of my users already are LinkedIn users, what's your roadmap for profile update APIs ? I read "this is longer term work, so not right around the corner" in one of your replies above, how longer
?
Thanks,
Thomas
Hi Lucian, As far as I see from Profile Fields, there is only one field for company is "company/name" in position mode. Do you have a plan to support retrieving more company data fields, such as: type, industry, website, size, headquater address, etc. ???? Cheers, Quyen
Hi,
When requesting profile for a user using the profile API and id=, I noticed if 'connections' is part of the requested field, I get a 403 status, but removing 'connections' from the list of requested fields works fine. According to the profile fields doc, the 'connections' field was to return only the connections count:
From Basic Profile Fields description for 'connections':
"an empty collection, indicating the # of connections the member has with a total attribute"
Am I not understanding or using this correctly? I am simply trying to get the connections count given a user id.
Many thanks.
Michael
I have the same error with the fields "connections".
Is any solutions?
I am using http://api.linkedin.com/v1/people/url= and it just doesn't work! I have a public url, and I am searching a connection of the logged in user, and still I can not find a profile. It returns "(400) Bad Request" error. I am encoding the URL and adding it to the request still nothing! What should I do?
Having Problems?