LinkedIn API - get information about my ALL Connections
Asked Answered
R

5

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.

Resilience answered 7/1, 2014 at 11:6 Comment(1)
I was able to get list of connections using api.linkedin.com/v1/people/~/connections?modified=new . How do I also get birthdates ( if shared publicly ) of my connections. !Resilience
B
38

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.

Bacterium answered 21/1, 2014 at 13:55 Comment(8)
Is it possible to get my linkedin connections date-of-birthCockhorse
It looks to no longer be there. Is it deprecated now?Theriault
@Theriault i'm noticing the same issue, could you let me know if you find anything?Creight
It seems the connections API is only for LinkedIn partners now.Keeper
@Keeper you are right. It has been written in "API availability" section at 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."Mohsen
Yes this is supported only for LinkedIn partner now since 12th May 2015 developer.linkedin.com/blog/posts/2015/…Lineation
Not generally applicable, API removed.Lecce
How to get access to the restricted APIs, exactly?Smashed
M
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.

Measures answered 22/1, 2014 at 3:19 Comment(1)
My Connections from left column is no longer available.Bournemouth
P
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

Piceous answered 15/1, 2014 at 10:33 Comment(7)
I did checked that document. But couldnt figure out much.. Can you give me exact api and how to execute it.Resilience
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.Resilience
I'm guessing you don't need to have any app ready. Follow the instructions provided in 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 api.linkedin.com/v1/people/~/connections and api.linkedin.com/v1/people/id=12345/connections to get the connections of any user (if the info is public).Piceous
These URL requests will return an XML file [Refer: developer.linkedin.com/documents/connections-api# for sample output]Piceous
I could get list of connections. How could I get birthdates ( if shared publicly) of my connections !Resilience
This API is no longer available. see: github.com/dwyl/hapi-auth-linkedin/issues/…Pasadis
How to get access to the restricted APIs?Smashed
C
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

Chancery answered 12/3, 2016 at 15:37 Comment(2)
This does not work anymore, as someone said some answers above: "LinkedIn has restricted their open API access, and this no longer works."Debut
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.Boice
C
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

Consultation answered 3/10, 2019 at 13:44 Comment(3)
"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?Niehaus
What does "r_1st_connections" mean, exactly, @Ronaldo Bahia?Smashed
this @Smashed will get your first connections as it says .sorry for the late response.Consultation

© 2022 - 2024 — McMap. All rights reserved.