title: Yahoo API with Ruby on Rails and OAUTH2
body: <p>I have an RoR site that gets data from stock exchanges and I am using Yahoo's finance table via the Yahoo API. I need authorization to gain full access to YQL, which requires that I use Oauth2.  I need help getting OAuth access to Yahoo.</p>
  
  <p>This is what I have tried: </p>
  
  <pre><code>client = OAuth2::Client.new(oauth_consumer_key,oauth_consumer_secret, {
          access_token_path:   '/oauth/v2/get_token',
          authorize_path:      '/oauth/v2/request_auth',
          authorize_url:       'https://api.login.yahoo.com/oauth/v2/request_auth',
          request_token_path:  '/oauth/v2/get_request_token',
          site:                'https://api.login.yahoo.com'
      })
  puts client.auth_code.authorize_url( redirect_uri: "http://localhost:3000")
  code = gets.chomp
  token = client.auth_code.get_token(code, redirect_uri: "http://localhost:3000")
  </code></pre>
  
  <p>I don't know which "code" I must use. Authorize_url returns me this <a href="https://api.login.yahoo.com/oauth/v2/request_auth?response_type=code&amp;client_id=dj0yJmk9YTlQOVhqeURmaTVYJmQ9WVdrOVZtUlVWMnBoTm5FbWNHbzlNVE14TWpBeU5qTTJNZy0tJnM9Y29uc3VtZXJzZWNyZXQmeD0wYg--" rel="nofollow noreferrer">URL</a>, but it is unclear what the "code". I was inspired by this <a href="https://stackoverflow.com/questions/7236193/oauth2-with-intridea-ruby-gem">Question</a>.</p>