Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Signature not working correctly. #336

Open
Tarokan opened this issue Nov 19, 2017 · 0 comments
Open

Signature not working correctly. #336

Tarokan opened this issue Nov 19, 2017 · 0 comments

Comments

@Tarokan
Copy link

Tarokan commented Nov 19, 2017

I have the following code to communicate with the FatSecret API which uses OAuth 1.0.

`
describe('OAuth1.0',function(){
var OAuth = require('oauth');

it('tests FatSecret API',function(done){
var oauth = new OAuth.OAuth(
null,
null,
CONSUMER_KEY,
CONSUMER_SECRET,
'1.0',
null,
'HMAC-SHA1',
32
);
oauth.get(
'http://platform.fatsecret.com/rest/server.api',
PROFILE_TOKEN, //test user token
PROFILE_SECRET, //test user secret
function (e, data, res){
if (e) console.error(e);
console.log(require('util').inspect(data));
done();
});
});
});
`

I'm getting this response:
<?xml version="1.0" encoding="utf-8" ?>\r\n<error xmlns="http://platform.fatsecret.com/api/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://platform.fatsecret.com/api/1.0/ http://platform.fatsecret.com/api/1.0/fatsecret.xsd">\r\n\t<code>2</code>\r\n\t<message>Missing required oauth parameter: oauth_signature_method</message>\r\n</error>\r\n

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant