LinkedIn V2 api: Not enough permissions to access /me GET

14,151

Solution 1

The LinkedIn API has been largely closed off and is only available to approved LinkedIn developers. You can request authorisation here: https://business.linkedin.com/marketing-solutions/marketing-partners/become-a-partner/marketing-developer-program

Solution 2

This is a old question, but the solution is to use the scope r_liteProfile instead of r_basicprofile during the first step of authorization.

https://www.linkedin.com/oauth/v2/authorization?response_type=code&client_id=*****&redirect_uri=http://yourauthorizationserver&state=RandomString&scope=r_liteprofile

Then, use the value of the code parameter passed back from LinkedIn to http://yourauthorizationserver in the second step of authorization:

curl -X POST \
'https://www.linkedin.com/oauth/v2/accessToken?code=codeobtainedwiththefirstcall&grant_type=authorization_code&client_secret=*****&client_id=***&redirect_uri=yourredirecturi' \

Solution found here: Any queries to the api.linkedin.com/v2/ return "Not enough permissions to access ..."

Share:
14,151

Related videos on Youtube

Avishekh Bharati
Author by

Avishekh Bharati

Graduate from RMIT university with Masters in Information Technology along with experience in software development & support, seeking a full-time role in software engineering. Have experience working in large enterprise teams and agile startups making software. Enjoys working with .NET, React, Node.js. I am also interested in tech opportunities and connecting with people in the industry over our mutual love of coffee.

Updated on June 04, 2022

Comments

  • Avishekh Bharati
    Avishekh Bharati almost 2 years

    I have been trying to use the linkedin V2 api, but constantly getting error. I created an developer application. Set up redirect url as "https://www.getpostman.com/oauth2/callback" to make request using postman (as per postman documentation). Filled up form to request access token.

    enter image description here

    But everytime I use the token and make a query, I get an error:

    enter image description here

    But I have selected all the default application permissions in my application. Am I missing something?

  • Matthijs Bierman
    Matthijs Bierman almost 6 years
    Even with that permission, it does not appear to work. LinkedIn is completely closed now. We should all stop using it.
  • Amarjit Singh
    Amarjit Singh over 5 years
    I just want to implement sign up. Do I still have to apply there.
  • Morris
    Morris over 5 years
    r_basicprofile should theoretically be accessible without requesting this formal authorization. docs.microsoft.com/en-us/linkedin/shared/references/v2/profi‌​le/… However, many fields are not working for me even after gettingr_basicprofile granted by the user.
  • someone
    someone about 5 years
    @Sinister Beard, there isn't any reason to request this authorisation if we only need do use OAuth2 basic profile - in my case, only email address. There isn't anything in LinkedIn user guide for developers that suggest to do this.
  • Sinister Beard
    Sinister Beard about 5 years
    @mpoletto No, there isn't - but that's the documentation being lacking.
  • someone
    someone about 5 years
    @SinisterBeard How can you sure about that?
  • Sinister Beard
    Sinister Beard about 5 years
    I mean, I can't prove a negative, but can you make it work?
  • someone
    someone almost 5 years
    @SinisterBeard No, I can't. And I tried to request an authorisation to become a marketing partner and they denied. Now, I understand there isn't any information in official documentation about the new politic to approve new developers users for their API.
  • Sinister Beard
    Sinister Beard almost 5 years
    @mpoletto developer.linkedin.com/blog/posts/2015/… - I'll add this to my answer as well.
  • Angelina Tsuboi
    Angelina Tsuboi about 3 years
    Thank you so much!
  • Yar
    Yar about 2 years
    Does anybody know what permission is needed to access docs.microsoft.com/en-us/linkedin/shared/integrations/people‌​/… ?
  • Yar
    Yar about 2 years