linkedin“不允许该应用程序创建应用程序令牌". [英] linkedin "this application is not allowed to create application tokens"
问题描述
我的主要问题是获取令牌.除了这一步,我走得更远.
在Linkedin API的文档中,描述了两种获取令牌的方法. 女巫是正确的吗?
1) https://developer.linkedin.com/docs/v2/oauth2-client-credentials-flow 2) https://developer.linkedin.com/docs/oauth2#configure >
我了解到,为了使用新的Linkedin API(合作伙伴的API),我应该使用第一个(> https://www.linkedin.com/oauth/v2 /accessToken?grant_type = client_credentials& client_id = {MYCLIENTID}& client_secret = {MYCLIENTSECRET}
响应: 错误"access_denied" error_description不允许该应用程序创建应用程序令牌"
我被困在这里.
第二个( https://developer.linkedin.com/docs/oauth2#configure )我实际上得到了一个令牌: https://www.linkedin.com/oauth/v2/authorization? response_type = code& client_id = {MYCLIENTID}& redirect_uri = {MYURIREDIRECT}& state = {STATERETURNED}
这将返回用于发出令牌请求的代码(和州):
https://www.linkedin.com/oauth/v2 /accessToken?grant_type = authorization_code& client_id = {MYCLIENTID}& client_secret = {MYCLIENTSECRET}& redirect_uri = {MYURIREDIRECT}& code = {CODERETURNED}
我得到了令牌.但这不是正确的方法吗?
默认情况下,您将需要使用authorization_code流来获取访问令牌.根据文档,client_credentials流默认情况下未启用,需要由LinkedIn专门启用.
https://developer.linkedin.com/docs/v2/oauth2-client-credentials-flow
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?
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
这篇关于linkedin“不允许该应用程序创建应用程序令牌".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!