1

Issuing a request (with postman) to https://api.linkedin.com/v2/me?fields=id,positions returns:

{
    "serviceErrorCode": 100,
    "message": "not enough permissions to access field $$* for GET /me",
    "status": 403
}

whereas the same request without query params gives me the user's basic profile, and whereas a request like https://api.linkedin.com/v2/me?fields=id,positions:($*:(id,company,title)) returns:

{
    "serviceErrorCode": 100,
    "message": "not enough permissions to access field id for GET /me",
    "status": 403
}

What am I doing wrong?

As an aside, I want position IDs, but the endpoint doesn't return them by default, contrary to what the docs say about them being required.

  • Did this ever get resolved? I am running into the same issue. – Muhwu Nov 02 '17 at 10:46
  • @Muhwu no; i have moved on. LinkedIn is no help. They DO NOT "monitor" stackoverflow for questions with linkedin tags. I suspect that maybe you need fullprofile scope, but that apparently requires a partner account with linkedin. You wouldn't know that from reading the docs though. – Mr. Mastodon Farm Nov 06 '17 at 20:22
  • This answer might help, https://stackoverflow.com/a/31524701/2725217 – Heikki May 19 '18 at 14:34
  • Though it's not clear from the documentation, LinkedIn API is private. You need to request authorisation from them: https://developer.linkedin.com/partner-programs – Sinister Beard Jun 21 '18 at 07:20

2 Answers2

0

You are likely using the r_liteprofile OAuth scope. With this scope, you can only fetch the id, firstName, lastName, and profilePicture fields.

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

You cannot read the positions field, unless you have another scope. However, those scopes are only provided to approved partners to implement very narrowly targeted use cases.

Adam Trachtenberg
  • 2,231
  • 1
  • 14
  • 18
-1

https://api.linkedin.com/v2/me?projection=(id,firstName,lastName,positions~)

Make sure you are authorised to use the api, using v2 key

Ambarish
  • 139
  • 1
  • 5
  • note that I said "the same request without query params gives me the user's profile". My app has a v2 key. – Mr. Mastodon Farm Aug 17 '17 at 15:05
  • I just created my app. I have exactly the same issue: `GET https://api.linkedin.com/v2/me?projection=%28id%2CfirstName%2ClastName%2Cpositions~%29&oauth2_access_token=oauthTokenGoesHere` > Make sure you are authorised to use the api, using v2 key @Ambarish What kind of authorization needed? I already have access token. What else do they need? – zoonman Aug 18 '17 at 18:59
  • I authenticated via the v2 oauth flow and it gave me a valid token, but I get permission denied for `me`. Or do I have to enable v2 API from some settings for my entire app (I don't mean on my end but on linkedin's end)? – Muhwu Dec 05 '17 at 03:28