Tumblr - oauth_signature 与预期值不匹配
Tumblr - oauth_signature does not match expected value
这个话题已经有话题了,但是我这边一直没能解决问题
我为AdonisJS Ally和Tumblr开发了auth驱动,回调后报错。但是,oAuthToken、requestToken.oAuthTokenSecret 和 oAuthVerifier 是正确的(至少,我认为) .
响应是:
error { statusCode: 401, data: 'oauth_signature does not match
expected value' }
请求令牌URL:
var request = require("request");
var oauth ={
consumer_key: "****************************",
consumer_secret: "****************************"
};
var url = 'https://www.tumblr.com/oauth/request_token'
request.post({url:url, oauth:oauth}, function (e, r, body) {
var temp1 = body.split("&");
var auth_token=temp1[0].split("=")[1];
var auth_secret=temp1[1].split("=")[1];
var tokens=[auth_token,auth_secret];
console.log(temp1)
cb(undefined,{d:tokens});
})
这段代码对我有用,试试这个。
tumblr 没有适当的文档,但从文档中我了解到有 3 种方法可以在 tumblr 中进行身份验证并接收 auth_token 和 auth_token 秘密上述代码可能无法正常工作,因为有变化auth_nonce 和 auth_signature 因此您会收到错误消息
oauth_signature 与预期值不匹配 所以我建议使用我的方法生成 auth_token 和 auth_token_secret。此代码无需添加任何签名和 nonce
即可运行
这个话题已经有话题了,但是我这边一直没能解决问题
我为AdonisJS Ally和Tumblr开发了auth驱动,回调后报错。但是,oAuthToken、requestToken.oAuthTokenSecret 和 oAuthVerifier 是正确的(至少,我认为) .
响应是:
error { statusCode: 401, data: 'oauth_signature does not match expected value' }
请求令牌URL:
var request = require("request");
var oauth ={
consumer_key: "****************************",
consumer_secret: "****************************"
};
var url = 'https://www.tumblr.com/oauth/request_token'
request.post({url:url, oauth:oauth}, function (e, r, body) {
var temp1 = body.split("&");
var auth_token=temp1[0].split("=")[1];
var auth_secret=temp1[1].split("=")[1];
var tokens=[auth_token,auth_secret];
console.log(temp1)
cb(undefined,{d:tokens});
})
这段代码对我有用,试试这个。 tumblr 没有适当的文档,但从文档中我了解到有 3 种方法可以在 tumblr 中进行身份验证并接收 auth_token 和 auth_token 秘密上述代码可能无法正常工作,因为有变化auth_nonce 和 auth_signature 因此您会收到错误消息 oauth_signature 与预期值不匹配 所以我建议使用我的方法生成 auth_token 和 auth_token_secret。此代码无需添加任何签名和 nonce
即可运行