I am trying to get a request token from twitter, and I’ve been having some problems with it. I used twitter4J to see if it would work with that and it does, but when I use the twitter oauth tool to get a valid authorization header, and copy and paste it as the authorization header for http://api.twitter.com/oauth/request_token in the twitter developer console I get a 401 error (“failed to validate signature and token”). I have tried this same copy and paste method for other requests that require authentication and it works but it just won’t work for this request. Any suggestions as to what is going on?
Share
Ok I figured it out! The problem was that the oauth access token is included in the header when you use the twitter oauth tool, with the access token being that of the twitter account related to your application. But if you are using the request_token url you shouldn’t already have that, and that is why it throws the error. Thus the twitter oauth tool is useless for a request to this url.