Reputation: 51
recently I've tried to use the LinkedIn API and I've faced a really basic problem, but I couldn't understand the basic usage of this API.
In another APIs you can get information on another person. but in LinkedIn I couldn't figure out how to do it.
I've already tried the urls below, but it didn't work.
https://api.linkedin.com/v1/people/(linkedinID)?format=json
https://api.linkedin.com/v1/people/id=(linkedinID)?format=json
Thank you people!
Upvotes: 1
Views: 1844
Reputation: 21
Make sure that you're using a valid access token with your requests. To get one follow the steps here: https://developer.linkedin.com/docs/oauth2
To get info on another person's profile make a request with a member ID.
Request:
https://api.linkedin.com/v1/people/id=MEMBER_ID?format=json
Response:
{
"firstName": "FIRST_NAME",
"headline": "HEADLINE",
"id": "MEMBER_ID",
"lastName": "LAST_NAME",
"siteStandardProfileRequest": {
"url": "https://www.linkedin.com/profile/view?id=ID&authType=name&authToken=AUTH&trk=TRK"
}
You can test out requests here: https://apigee.com/console/linkedin
Upvotes: 2