35

I have used Facebook API but I am new to Linkedin api.

I need some help on how to get information (name, birthday, etc) about my ALL Connections, and I need help with both the token and the info-related API calls.

As for the token -- in Facebook there is the Facebook Console to generate tokens at runtime and test our API calls... Does LinkedIn have something similar?

Update: I'm able to get list of connections using:

http://api.linkedin.com/v1/people/~/connections?modified=new

... but how can I also get birthdates (if shared publicly)? I've attempted:

http://api.linkedin.com/v1/people/~/connections:(headline,first-name,last-name,date-of-birth)

...however, that shows me the first and last name but NOT the date of birth.

General Grievance
  • 4,555
  • 31
  • 31
  • 45
Deepak Singhal
  • 10,568
  • 11
  • 59
  • 98
  • I was able to get list of connections using https://api.linkedin.com/v1/people/~/connections?modified=new . How do I also get birthdates ( if shared publicly ) of my connections. ! – Deepak Singhal Jan 22 '14 at 08:04

5 Answers5

37

You can use the rest console here: http://developer.linkedin.com/rest-console

There is a template method you can use called "Get My Connections".

I hope this helps.

Update: LinkedIn has restricted their open API access, and this no longer works.

Samer Bechara
  • 2,099
  • 16
  • 24
  • Is it possible to get my linkedin connections date-of-birth – Karthick M Dec 11 '14 at 07:10
  • 15
    It looks to no longer be there. Is it deprecated now? – chapinkapa Apr 15 '15 at 16:52
  • @chapinkapa i'm noticing the same issue, could you let me know if you find anything? – Eduardo Apr 15 '15 at 19:16
  • 3
    It seems the connections API is only for LinkedIn partners now. – adosaiguas May 08 '15 at 20:45
  • 3
    @adosaiguas you are right. It has been written in "API availability" section at https://developer.linkedin.com/support/developer-program-transition that "If your application is currently using any other API services (e.g. Connections, Groups, People Search, Invitation, Job Search, etc.) you will have to apply to become a member of a relevant Partner Program that provides the necessary API access to continue to leverage any of the endpoints that are not listed above." – Yashrajsinh Jadeja Jun 02 '15 at 09:42
  • Yes this is supported only for LinkedIn partner now since 12th May 2015 https://developer.linkedin.com/blog/posts/2015/developer-program-changes – Peter T. Oct 01 '15 at 09:10
  • Not generally applicable, API removed. – Artur Bodera Apr 26 '16 at 12:03
  • How to get access to the restricted APIs, exactly? – Yar Mar 15 '22 at 10:18
5

https://apigee.com/console/linkedin Select OAuth2, click connect, then allow LinkedIn to privede apigee to your LI profile. Then in the left collumn, select Get My Connections. apigee prepares most of params, except format (xml/json), which you can add yourself.

TruongSinh
  • 4,662
  • 32
  • 52
2

I think what you are looking for, is the Linkedin Connections API. You can look at the documentation provided here -> http://developer.linkedin.com/documents/connections-api

There are also various other APIs for accessing profile, groups, companies, and jobs.

It returns an XML document so, you should be able to generate tokens and test your API calls without any problem.

These APIs are no longer available

Ravindra
  • 59
  • 1
  • 10
  • I did checked that document. But couldnt figure out much.. Can you give me exact api and how to execute it. – Deepak Singhal Jan 15 '14 at 14:42
  • Biggest challenge I am facing is how to execute the queries.. I do not have an app ready.. I wanted some sort of tool like "Facebook Explorer" which helps to get "Auth tokens" and test the api. – Deepak Singhal Jan 16 '14 at 12:13
  • I'm guessing you don't need to have any app ready. Follow the instructions provided in http://developer.linkedin.com/documents/authentication to register yourself with a dummy app with your linkedin profile and get the authentication. Once you get the authentication you can send URL Requests like http://api.linkedin.com/v1/people/~/connections and http://api.linkedin.com/v1/people/id=12345/connections to get the connections of any user (if the info is public). – Ravindra Jan 21 '14 at 08:12
  • These URL requests will return an XML file [Refer: https://developer.linkedin.com/documents/connections-api# for sample output] – Ravindra Jan 21 '14 at 08:14
  • I could get list of connections. How could I get birthdates ( if shared publicly) of my connections ! – Deepak Singhal Jan 22 '14 at 08:03
  • 2
    This API is no longer available. see: https://github.com/dwyl/hapi-auth-linkedin/issues/1#issuecomment-162172096 – nelsonic Dec 05 '15 at 12:00
  • How to get access to the restricted APIs? – Yar Mar 15 '22 at 10:18
2

Looks like now no such API available(Looks like depricated by Linkedin). Please let me know if i am wrong and suggest other ways to achieve user's connections.

I am getting this in response

{
  "errorCode": 0,
  "message": "Access to connections denied",
  "requestId": "6Sxxxxxxx",
  "status": 403,
  "timestamp": 14xxxxxxxxx
}

Please see : https://developer.linkedin.com/support/developer-program-transition

Shashank.gupta40
  • 915
  • 1
  • 8
  • 26
  • 1
    This does not work anymore, as someone said some answers above: "LinkedIn has restricted their open API access, and this no longer works." – Rafael Moni Jun 21 '16 at 11:56
  • Yes, they have restricted their API access, but you can ask for a business relationship with them to have an extended access to their API. – javadev Jan 11 '17 at 09:01
1

2019 still works but with a different approach.

Do this:

You may follow the steps from here: https://learn.microsoft.com/en-us/linkedin/shared/authentication/authorization-code-flow?context=linkedin/consumer/context

1 - Create an APP with r_1st_connections permission 2 - Authorization (STEP 2 from link)

GET https://www.linkedin.com/oauth/v2/authorization

scope should be r_1st_connections (your app must have this permission)

3 - Log in with your username and password

4 - Linkedin will return you code

something like: ?code=QWERTY

5 - Get your Access Token (STEP 3 from link)

POST https://www.linkedin.com/oauth/v2/accessToken

6 - Get your connections

GET https://api.linkedin.com/v2/connections?q=viewer&start=0&count=50

Link: https://learn.microsoft.com/en-us/linkedin/shared/integrations/people/connections-api?context=linkedin/compliance/context

Ronaldo Bahia
  • 576
  • 3
  • 24
  • 2
    "Create an APP with r_1st_connections" Do I need to request 'Marketing Developer Platform' from Products tab of my Linkedin App? Currently I can see only r_emailaddress, r_liteprofile & w_member_social in Auth tab. I'm understanding everything other than how to get this permission from linkedin? Can someone please guide? – Muhammad Noman May 19 '20 at 20:38
  • What does "r_1st_connections" mean, exactly, @Ronaldo Bahia? – Yar Mar 15 '22 at 10:17
  • this @Yar will get your first connections as it says .sorry for the late response. – Ronaldo Bahia May 19 '22 at 13:37