Can't generate application only bearer token

oauth
api

#1

I somehow can’t generate a bearer token.

I tried using curl (Consumer Key/Secret no longer valid):

$ echo E1YCsjVfZansJqvGpLJECiST2:Afk37rlD6SjDvtU9fpIiXmC9v0QJuLoIe2l9tEEoJ8frhdiTjg | base64
RTFZQ3NqVmZaYW5zSnF2R3BMSkVDaVNUMjpBZmszN3JsRDZTakR2dFU5ZnBJaVhtQzl2MFFKdUxv
SWUybDl0RUVvSjhmcmhkaVRqZwo=

$ curl -s -d "grant_type=client_credentials" -H "Authorization: Basic RTFZQ3NqVmZaYW5zSnF2R3BMSkVDaVNUMjpBZmszN3JsRDZTakR2dFU5ZnBJaVhtQzl2MFFKdUxvSWUybDl0RUVvSjhmcmhkaVRqZwo=" -H "Content-Type: application/x-www-form-urlencoded;charset=UTF-8" -H "Accept-Encoding: gzip" https://api.twitter.com/oauth2/token | gunzip -

{"errors":[{"code":99,"message":"Unable to verify your credentials","label":"authenticity_token_error"}]}%

What am I doing wrong?


#2

Ok, apparently did the base64 encoding not work properly. Doing it in nodejs worked.

//Closed


#3