I’m attempting to get a bearer token with this curl. The end goal is to get it to work in node, but I get the same error either way.
Generated key with:
var KEY = new Buffer(’___’).toString(‘UTF-8’) + ‘:’ + new Buffer(’_________’).toString(‘UTF-8’);
var base64key = new Buffer(KEY).toString(‘base64’);
curl --request ‘POST’ ‘https://api.twitter.com/oauth2/token?grant_type=client_credentials’ --header 'Authorization: “Basic XXXXXX”, Content-Type: “application/x-www-form-urlencoded;charset=UTF-8” ’ --verbose
I always get this response:
{“errors”:[{“code”:99,“label”:“authenticity_token_error”,“message”:“Unable to verify your credentials”}]}