linkedin oauth 请求访问令牌
我在尝试从 linkedin oauth api 获取 oauth_token 和 oauth_token_sceret 时遇到问题。我可以获取 requestToken (第一个请求),但在回调页面(用户批准应用程序后)我试图获取令牌和秘密,但我总是得到 401 并且它说签名无效。 我将以下值发布到 https://api.linkedin.com/uas/oauth/accessToken : - oauth_consumer_key - oauth_nonce - oauth_signature_method - oauth_时间戳 - oauth_token - oauth_验证者 - oauth_version
作为旁注,我不明白为什么我会得到验证程序(我不需要 PIN,因为它在浏览器中运行)。 我能够获取令牌和秘密的唯一方法是当我还发布在第一个请求中收到的“oauth_token_secret”时(当我请求 requestToken 时)。 但我无法在回调页面中获取这个oauth_token_secret。
我发现您需要将在第一个 requestToken 请求(第一个请求)中获得的秘密令牌传递给访问令牌,并且它正在工作。
I have a problem when trying to get the oauth_token and oauth_token_sceret from linkedin oauth api. I can get requestToken (1st request), but in the callback page (after the user approved the app) I'm trying to get the token and the secret but I always get 401 and it says the signature is invalid.
I'm posting the following values to https://api.linkedin.com/uas/oauth/accessToken:
- oauth_consumer_key
- oauth_nonce
- oauth_signature_method
- oauth_timestamp
- oauth_token
- oauth_verifier
- oauth_version
as a side note i don't understand why I'm getting the verifier (I don't need the PIN since it's running in a browser) .
The only way I was able to get the token and the secret was when I also post the "oauth_token_secret" I received in the 1st requrst (when I asked for requestToken).
But I can't get this oauth_token_secret in the callback page.
I found out you need to pass in the secret token you get in the first request for requestToken (1st request) to the access token and it is working.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
完成第一阶段并获得请求令牌后,您应该已传回请求令牌和验证程序,如下所示:
https://developer.linkedin.com/documents/oauth-overview
然后,以与请求令牌相同的方式将请求令牌与验证程序一起传回(签署请求)等),你应该接收访问令牌。
Once you have the first stage done and you have the request token, you should have been passed back the request token and the verifier, per:
https://developer.linkedin.com/documents/oauth-overview
Then, pass the request token back along with the verifier in the same way you did for the request token (signing the request, etc) and you should receive the access token.