OAuth::Problem: timestamp_refused


I implemented a Yahoo Boss V2 search on my website. Eventually I got everything to work as expected. This all worked since begin of June. Yesterday morning I suddenly got the error "OAuth::Problem: timestamp_refused". This error starts showing up when I request "get_request_token" with my consumer.

def create_access_token
self.consumer= OAuth::Consumer.new(Client.conf("yahoo_oauth")["consumer_key"], Client.conf("yahoo_oauth")["consumer_secret"],
{ :site => 'https://api.login.yahoo.com/',
:http_method => 'get',
:request_token_path => '/oauth/v2/get_request_token',
:access_token_path => '/oauth/v2/get_token',
:authorize_path => '/oauth/v2/request_auth',
:oauth_callback => ">>>removed due to privacy reasons<<<",
:oauth_timestamp => Time.now.to_i,
:oauth_signature_method => "HMAC-SHA-1",
:oauth_version => 1.0,

self.request_token = self.consumer.get_request_token
... continue doing other stuff...

The error occurs here: self.request_token = self.consumer.get_request_token

Once again, this is on my production, where everything worked flawlessly, where nothing was changed. Out of thin air this error occurred.
Could you please tell me where to look for a solution?
I tried to remove the timestamp from the consumer creation to the same result.

1 Reply
  • Hello, 

    I also got the same problem. So, for resolving this issue what i did is below:

    I just added some more time to what i was assigning to timestamp variable.. Now how much you extra need to add is you can calculate from the error message. In the error message they shows the acceptable timestamp range. So..bring your timestamp to this range then the issue will resolved...:) :)


    Dinesh Mangal

Recent Posts

in OAuth General Discussion YDN SDKs