3

I got the Access Token (with scope: r_basicprofile r_emailaddress w_share) try with r_fullprofile too.

i'm based on this docs to authorize: https://developer.linkedin.com/docs/oauth2

Next i make request to the https://api.linkedin.com/v2/me endpoint

curl -H "Authorization: Bearer ACCESS_TOKEN"
    -H "Accept: application/json"
    -H "Content-Type: application/json"

Get response:

{
    "serviceErrorCode": 100,
    "message": "Not enough permissions to access /me GET ",
    "status": 403
}

Realy dont know why?

2 Answers2

4

Turns out that with the new v2 of the API you need to use the r_liteprofile and r_emailaddress scopes.

https://learn.microsoft.com/en-us/linkedin/consumer/integrations/self-serve/sign-in-with-linkedin

Dries Vints
  • 639
  • 4
  • 18
1

LinkedIn API is private. You need to request authorisation from them: https://business.linkedin.com/marketing-solutions/marketing-partners/become-a-partner/marketing-developer-program

Sinister Beard
  • 3,570
  • 12
  • 59
  • 95
  • This is incorrect. Although the sentence gets cut off it literally says "We are currently accepting applications to access our Ad Technology, Marketing Analytics and Audience Management APIs. No application is required to access our basic" on that page. It should be perfectly possible to perform the above request without having to be approved. Maybe the API was opened to public since this issue was posted but I'm currently still facing the same problem. – Dries Vints Dec 17 '18 at 20:20
  • Earlier, i have already requested authorization and has these scopes: r_emailaddress w_share, r_basicprofile, r_liteprofile, rw_company_admin, r_network, r_fullprofile, w_member_social. But after updating to api v2, do we have to apply again for the marketing developer program? – hamedazhar Feb 11 '19 at 10:26