Ahmed J.
Ahmed J.

Reputation: 11

How to authenticate with LinkedIn API using 2-legged authentication?

Basically, I want to authenticate with the LinkedIn app with the 2-legged type to get access to LinkedIn APIs like Jobs. But the issue is that you cannot set the 2-legged type from the LinkedIn app directly.

For more details, I attached all the guidance from Microsoft on LinkedIn APIs.

I'm attempting to obtain a token using the Client Id and Secret provided by the LinkedIn App. I expected to get access from Two-Legged Flow, as the documentation explained on Microsoft Learn. The result the Get Token API returned was access denied with response code 401.

Upvotes: 1

Views: 491

Answers (1)

Frank Leverenz
Frank Leverenz

Reputation: 309

I've got the same issue

My LinkedIn-App has the status "verified" and I added the Products "Share on LinkedIn" and "Sign In with LinkedIn", so the OAuth 2.0 scopes in the "Auth"-Tab are:

  • r_emailaddress
  • openid
  • profile
  • r_liteprofile
  • w_member_social
  • email

If I POST https://www.linkedin.com/oauth/v2/accessToken with the app credentials, I get 401 too

{
    "error": "access_denied",
    "error_description": "This application is not allowed to create application tokens"
}

@Ahmed J.

Do you get a solution what we have to do, that the app is allowed to create a token?

Upvotes: 0

Related Questions