401 Error on request_token "Failed to validate oauth signature and token"



I’m working on a web application that requires twitter integration, and I’m failing when trying to get an access token. I get a 401 error with the message “Failed to validate oauth signature and token.” I’m not sure where I’m slipping up. I’ve tested my signing procedure using the sample data on the site, and it appears to be generating the correct signature.

Here is a sample signature base string I’m generating:


I’m making a POST to this URL, with the following Authentication header.

Authorization:  OAuth oauth_callback="oob", oauth_consumer_key="QRyK5Rz3EhHh2QgjqbCbiA", oauth_timestamp="1340040370", oauth_nonce="b2194ce0b96a11e1b59a251df3e7517a", oauth_signature_method="HMAC-SHA1", oauth_version="1.0", oauth_signature="Gf5TjH9w161P4n4Q6tyV0Uixu2I%3D"

Any ideas as to what I’m missing?


At first glance this looks correct from what I can tell. I would make sure that your timestamp is correct and close to our own (we return a Date HTTP header that will have our current time). Is there anything else special about how the request is executed? Are you using a library for this?


“oauth_signature_mehtod” ?


The same is the problem faced by me. . .Do anybody know the cause?