15

How to get email address and lite profile from linkedIn api v2 (api.linkedin.com/v2)

Can not get email from https://api.linkedin.com/v2/me?oauth2_access_token=xxxx

Requested &scope=r_emailaddress%20r_liteprofile

CaSpEr
  • 151
  • 1
  • 4

1 Answers1

21

you need to make a separate call

GET https://api.linkedin.com/v2/emailAddress?q=members&projection=(elements*(handle~))

https://learn.microsoft.com/en-us/linkedin/consumer/integrations/self-serve/sign-in-with-linkedin?context=linkedin/consumer/context#retrieving-member-email-address

Zoe
  • 27,060
  • 21
  • 118
  • 148
Jonathan Lee
  • 326
  • 1
  • 6
  • 12
    Such an obfuscated request/response for a very common use case, not to mention all the existing integrations breaking. Great way to support the developer community. Developers, developers, developers, right? /s – Matthijs Bierman Apr 16 '19 at 07:43
  • Does anyone have a snippet to see how to integrate these different API calls for email and liteprofile? I still can't get my head around this issue after having read their docs for the past few days. – rags2riches-prog Jun 05 '19 at 09:01
  • 5
    @rags2riches What do you mean "integrate"? You have to make one call to `https://api.linkedin.com/v2/me` endpoint for the basic profile and another call to the `https://api.linkedin.com/v2/emailAddress?q=members&projection=(elements*(handle~))` endpoint to get the email in their ridiculous handle format. – sdds Jun 05 '19 at 16:47