Twitter OAuth: “401 Unauthorized” & “Failed to validate oauth signature and token”

December 22nd, 2009 § 2

I pushed a new version of Twindicate.com live two days ago.  That night I was up till 3:45am trying to figure out why OAuth was not working at all.  All I could tell was that I was getting a “401 Unauthorized” response from Twitter.  I was completely torn apart by this, because I have put hundreds of hours into Twindicate. I honestly thought that Twitter had shut me off without telling me (sorry Twitter).

I tried regenerating my consumer keys, I output lines of debug code at every single step along the oauth code path, I stayed up late two night in a row. I almost cried, I was really choking it back there for a little while.  I searched google with no quality results helping me figure out what the issue was.

After 2 days and 4 seperate support requests with Twitter were completely ignored or immediate closed, I went back to the code.  I was actually talking with my friend Jason and saw the “body” of the response was encoded. I pulled it out of the response, output it to the page and found the error: “Failed to validate oauth signature and token”.  My first response was, “great, tell me something I didn’t know”.

So, I went back to Google and searched for this error. One of the first results was, “Failed to validate oauth signature and token” on Twitter Oauth – Check Your Clock! My first thought, “Ah crap!”.

I checked my clock, it was about 11 hours off. So I fixed it, using the instructions in the Setting the time of your system article.

I am glad that the solution was simple, frustrated that Twitter was not helpful with their support, and sad that my application I spent so much time on is so dependent on something this silly.

Tags: , , , , , , , , , ,

Sphere: Related Content

Tagged: , , , , , , , , , ,

§ 2 Responses to “Twitter OAuth: “401 Unauthorized” & “Failed to validate oauth signature and token””

What's this?

You are currently reading Twitter OAuth: “401 Unauthorized” & “Failed to validate oauth signature and token” at Reinforce Media, LLC.

meta

FireStats icon Powered by FireStats