node-twitter-api icon indicating copy to clipboard operation
node-twitter-api copied to clipboard

Bad Authentication Data when trying to get request token

Open siddharthgopi opened this issue 8 years ago • 2 comments

var twitterAPI = require('node-twitter-api');
var twitter = new twitterAPI({
  consumer_key: "removed",
  consumer_secret: "removed",
  callback: 'http://52.43.53.156:3000'
});

response:

Error getting OAuth request token : [object Object]
statusCode=400
data={"errors":[{"code":215,"message":"Bad Authentication data."}]}

My callback in this code is the same as what i entered in the twitter web interface.

siddharthgopi avatar Sep 17 '16 17:09 siddharthgopi

Is it correct that I have to take consumer_key and consumer_secret without any further modification directly from the twitter dashboard? as in the api_key and api_secret in https://apps.twitter.com/app/12851437/keys

  • All the twitter libraries are giving the same bad authentication error.
  • Does node version matter? [note: tried running it on https://runkit.com/npm/node-twitter-api. same bad authentication.]
  • I'm running express 4.14.0

siddharthgopi avatar Sep 18 '16 03:09 siddharthgopi

Yes, you need to use the API key and API secret. What exactly have you been trying to do, when you received the error?

reneraab avatar Sep 18 '16 05:09 reneraab