Matt Morgan
Matt Morgan

Reputation: 29

Access Denied When Trying To Verify LinkedIn Access Token

I am using this link https://api.linkedin.com/v2/me?oauth2_access_token= to try to verify the access token I received from next auth. My scopes are "profile openid email". I don't seem to be able to get any other kind of scopes on the LinkedIn developer platform. I am getting this error when I hit that link: { status: 403, serviceErrorCode: 100, code: "ACCESS_DENIED", message: "Not enough permissions to access: me.GET.NO_VERSION" } Why is this happening and how can I verify my access token.

I tried switching the scopes to r_basicprofile and some other scopes but obviously that didn't work because I can't update my scopes on my LinkedIn developer account.

Upvotes: 2

Views: 920

Answers (1)

Deffa
Deffa

Reputation: 31

It seems you're using the API associated with the old sign in method Sign In with LinkedIn.

The new method is named Sign In with LinkedIn using OpenID Connect and it uses the same scopes you have already identified: profile openid email.

However, the new API call to get user information is /v2/userinfo, not /v2/me. See here for more information.

Upvotes: 3

Related Questions