Johan Rincon
Johan Rincon

Reputation: 31

LinkedIn API v2 is not returning full profile data

I'm updating my application to use the LinkedIn API V2 and OAuth 2.0,. The changes works as expected retrieving the basic data (r_liteprofile, r_emailaddress)

However, I need retrieve some fields related to full profile (e.g, skills, educations) and others that previously were into the r_basicprofile (positions), but that fields are missing in the linkedIn response. here's the call that I'm using to get the data

https://api.linkedin.com/v2/me?projection=(id,firstName,lastName,educations,skills, positions)&oauth2_access_token=ACCES_TOKEN

And here's the response that I'm getting

{
  "firstName" : {
    "localized" : {
      "es_ES" : "Johan"
    },
    "preferredLocale" : {
      "country" : "ES",
      "language" : "es"
    }
  },
  "lastName" : {
    "localized" : {
      "es_ES" : "Rincon"
    },
    "preferredLocale" : {
      "country" : "ES",
      "language" : "es"
    }
  },
  "id" : "MY_LINKED_IN_ID"
}

My linkedIn app currently is working with the old API V1 and already has access to the r_fullprofile, so, with API V1 I'm getting the full profile fields as expected.

I've researched some hours, and the difference with other cases is that my app already has access to full profile (granted from V1)

My questions are:

  1. Am I need request again access to the full profile ?

  2. Am I doing some wrong for the API V2?

Here's the attachment where I'm verifying that I'm requesting the expected scopes

Requesting litle profile, email and full profile

Upvotes: 3

Views: 2707

Answers (2)

KPSingh
KPSingh

Reputation: 509

In V2 for using r_fullprofile you have to apply for partner program after approval only you can use r_fullprofile

Upvotes: 4

Peter van Mourik
Peter van Mourik

Reputation: 223

Have you tried calling the API with field projection like this:

https://api.linkedin.com/v2/me?fields=id,firstName,lastName,educations,skills,positions

According to the documentation you should request the required fields this way:

https://learn.microsoft.com/en-us/linkedin/shared/api-guide/concepts/projections

Hope it helps!

Upvotes: 1

Related Questions