Hi Felix, Are you using a specific OAuth library for the OAuth portion?
I would recommend adding a bit of logging around the OAuth token negotiation process.. find out the signature base string, the exact URL you're executing, and the Authorization header you're sending. Log the response code and body of the response when it fails. With the main OAuth ruby gem that's out there, some of these details are hard to come by because the values are hidden in private methods (PSA to OAuth library developers: don't do this), so you may need to monkey patch the OAuth gem here and there to debug the values. What you're mainly looking for is a specific pattern to your failed requests for a request token -- is some value not being sent correctly? Do you have some kind of problem where in certain conditions a variable you've set like your consumer key gets unset somehow? Is your system clock reliable? Is the library you're using to generate HMAC-SHA1 signatures doing the right thing? Are you using the right kind of URL encoding? Are you accidentally sending double parameters for something? Verify that you're using https://api.twitter.com/oauth/ as the base path for the OAuth negotiation steps. While there have been failures in the past in exchanging a request token for an access token due to some lag, we're not aware of anything specifically wrong with the process for fetching the request token. @episod <http://twitter.com/intent/user?screen_name=episod> - Taylor Singletary On Tue, Jun 14, 2011 at 7:25 AM, Felix Oldenburg < oldenburg.fe...@googlemail.com> wrote: > Hi twitter developing community, > I'm using ruby( on rails) to do the oauth dance manually and finally > call /1/statuses/update.json to update the status of an authorized > user. > > Every single step during the oauth procedure is confirmed to be > working. > Actually I already tweeted some messages successfully. But for no > obvious reason(to me), oauth sometimes fails at the very beginning > while acquiring a request token. Then it just sais: "Failed to > validate oauth signature and token". > > Then I retry it several times until it (suddenly) works. > The next step, i.e. exchanging the request token for an access token, > works perfectly every time. > But when it comes to the actual status update(i.e. calling the /1/ > statuses/update.json endpoint) it sometimes fails, too, saying "Failed > to validate oauth signature and token". > > Again I just retry a few times and all of a sudden it works. > > I don't change the code during this testing sessions, nor do i change > the text I want to be tweetet. > It just doesn't work sometimes. > I can't reproduce this "unwanted behavior". > > Did Somebody have the same issue? > Suggestions are also appreciated. > > Kind regards, Felix. > > -- > Twitter developer documentation and resources: https://dev.twitter.com/doc > API updates via Twitter: https://twitter.com/twitterapi > Issues/Enhancements Tracker: > https://code.google.com/p/twitter-api/issues/list > Change your membership to this group: > https://groups.google.com/forum/#!forum/twitter-development-talk > -- Twitter developer documentation and resources: https://dev.twitter.com/doc API updates via Twitter: https://twitter.com/twitterapi Issues/Enhancements Tracker: https://code.google.com/p/twitter-api/issues/list Change your membership to this group: https://groups.google.com/forum/#!forum/twitter-development-talk