3
votes

I followed the instructions directly from Linkedin's V2 API Documentation to get an access token and then try to get basic user information through the endpoint https://api.linkedin.com/v2/me , but it simply returns the following error:

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

I try to use the same code to the version 1 of the API equivalent (https://api.linkedin.com/v1/people/~?format=json) and it works.

Both the v1 and v2 documentation redirects to the same url (https://developer.linkedin.com/docs/oauth2), that makes sense because both authenticates via OAuth 2.0.

I review the permissions of my app and they looks good (I tried with r_basicprofile, * r_emailaddress*, both of them, and also with all the permissions availables both explicit when I request the access the authorization code and in the application settings in Linkedin Dashboard).

I would like to know if there is something that I'm missing or that I'm doing wrong in the process to make this work.

2
Did you ever manage to resolve this? I am having the same issue. - Muhwu
Nope, I also didn't find a solution in other related questions. I didn't really know if the v2 of the linkedin api is publicly available, because I can only get to the documentation searching in google. As soon as know something I will let you know, but currently we are not searching actively anymore. - Giovanni Benussi
Yeah it seems a little bit like an abandoned project doesn't it. :D - Muhwu
Also "subscribing" in case you found a solution. Additionally, do you know what kind of approvals (if any) are required to use the V2 API? I've been trying any endpoint I can find, but I'm getting permissions errors on all of them... - rinogo
As long as I remember, I never get rid of the permissions errors but I can't ensure that. Currently we are using v1 until we get some news about v2 of the API. Regards! - Giovanni Benussi

2 Answers

0
votes

LinkedIn API is private. You have to request authorization from them at https://business.linkedin.com/marketing-solutions/marketing-partners/become-a-partner/marketing-developer-program (or one of their other programs).

0
votes

If you authenticate with v2 using r_basicprofile(following this https://docs.microsoft.com/en-us/linkedin/shared/authentication/authorization-code-flow?context=linkedin/consumer/context) you are not allowed to query against https://api.linkedin.com/v2/me but can query on https://api.linkedin.com/v1/people/~.

To query against https://api.linkedin.com/v2/me you must authenticate using r_liteprofile.