1
votes

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

2
Hey, are you getting r_emailaddress along with r_liteprofile? in above sample response you didnot mention email field.sandeepmaaram

2 Answers

1
votes

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

0
votes

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://docs.microsoft.com/en-us/linkedin/shared/api-guide/concepts/projections

Hope it helps!