linkedin "this application is not allowed to create application tokens" [closed]
Asked Answered
E

1

27

My main problem is getting the token. I can’t go further than this step.

In the Linkedin API's docs there are two ways described to obtain the token. Witch is the correct one?

1) https://developer.linkedin.com/docs/v2/oauth2-client-credentials-flow 2) https://developer.linkedin.com/docs/oauth2#configure

I understand that in order to use the new Linkedin API (the partners one) I should use the first one (https://developer.linkedin.com/docs/v2/oauth2-client-credentials-flow)

Here is my petition:

https://www.linkedin.com/oauth/v2/accessToken?grant_type=client_credentials&client_id={MYCLIENTID}&client_secret={MYCLIENTSECRET}

The response: Error "access_denied" error_description "This application is not allowed to create application tokens"

And I get stuck here.

With the second one (https://developer.linkedin.com/docs/oauth2#configure) I actually get a token: https://www.linkedin.com/oauth/v2/authorization?response_type=code&client_id={MYCLIENTID}&redirect_uri={MYURIREDIRECT}&state={STATERETURNED}

This returns the code (and the State) which I use to make the token request:

https://www.linkedin.com/oauth/v2/accessToken?grant_type=authorization_code&client_id={MYCLIENTID}&client_secret={MYCLIENTSECRET}&redirect_uri={MYURIREDIRECT}&code={CODERETURNED}

And I get the token. But this isn’t the correct way to do it, is it?

Eonism answered 31/5, 2018 at 14:18 Comment(1)
Your question does not clearly explain what you're trying to do; nor specifically where did you find a problem. Also you're not properly using formatting/indentation so it's unreadable. Please modify your questions title so that it reflect what isn't working, and the description to what I described above.Faery
S
20

By default you will need to use the authorization_code flow to obtain an access token. Per the documentation the client_credentials flow is not enabled by default and needs to be specially enabled by LinkedIn.

https://developer.linkedin.com/docs/v2/oauth2-client-credentials-flow

Selfidentity answered 31/5, 2018 at 19:57 Comment(7)
would you please add a link to where you can request "Application Authorization" tokens?Pau
You should make a request using this link: linkedin.zendesk.comSympathizer
From Linkedin support: "Two legged auth is not available for any use case where member data is retrieved. All calls for member data must be three legged. Documentation exists because there are rare use cases where two legged auth can be used, but that partner program is not open at this time. To retrieve information about an organization, you will need to have a member that is listed as an admin for that specific company page. Permissions to access company page data are included in the Marketing Developer Program. Apply to the program at linkedin.com/developers"Multifold
Is there a way to do it from the backend if its three-legged? Like if there is no user or browser. I want to fetch my own profile data to do something in a backend script.Ascites
Link is broken...Unplumbed
2023 and the process of using the LinkedIn api is still a complete mess. I just want an api key...Unplumbed
Looks like this link works: learn.microsoft.com/en-us/linkedin/shared/authentication/…. However, I reached out to Linkedin to get permission for my app to create application tokens and was just told that Linkedin doesn't do developer support any more, and there's no way for us to get that permissionObstruct

© 2022 - 2024 — McMap. All rights reserved.