title: Yahoo Oauth API with OAuthBase.cs
body: <p>I am currently using the OAuthBase.cs helper class available on oauth.net to implement OAuth to talk to the Yahoo! fantasy API.  I am currently stuck on Step 5 (Using the access token/access secret to call the API Services).</p>
  
  <p>I successfully completed <a href="http://developer.yahoo.com/oauth/guide/oauth-accesstoken.html" rel="nofollow">Step 4</a> but cannot seem to create the actual service call.  <a href="http://developer.yahoo.com/oauth/guide/oauth-make-request.html" rel="nofollow">The documentation</a> is limited; what parameters am I supposed to be using?  I'm getting either a 401 or 400 http error.  I'm generating my signature by:</p>
  
  <pre><code>url = new Uri("http://query.yahooapis.com/v1/public/yql?q=select * from fantasysports.teams.roster.stats where team_key='nba.l.52669.t.5' and week='5' and stats_type='week' and stats_week='5'&amp;format=json");
  
  signature = oauth.GenerateSignature(url, string.Empty, consumerKey, consumerSecret, accessToken, accessTokenSecret, "GET", time, string.Empty, nonce, OAuth.OAuthBase.SignatureTypes.HMACSHA1, out normalizedUrl, out normalizedRequestParameters);
  
  using (var y = WebRequest.Create(string.Format("{0}?{1}&amp;oauth_signature={2}", normalizedUrl, normalizedRequestParameters, signature)).GetResponse())
  {
      ....
  }
  </code></pre>
  
  <p>where <code>url</code> is the api call i'm trying to make, <code>consumerKey</code> / <code>consumerSecret</code> are the keys given to me when I signed up for Yahoo!, and <code>accessToken</code> / <code>accessTokenSecret</code> are the response returned from <code>request_auth</code> in Step 4.  What am I doing wrong?</p>
  
  <p>Thanks in advance</p>
  
  <p>EDIT: 12/14 - for those not familiar with OAuthBase, it is essentially a library that generates the signature by 
  1. Consolidating all the url/parameters (consumerkey, token, tokenSecret, httpMethod, nonce, time etc), sorting it, and normalizing the url/parameters; 
  2. Encodes the consumerSecret '&amp;' tokenSecret as the HMACSHA1 key;
  3. computing the hash of the hmacsha1 key</p>