Getting Started with Yahoo and OAuth

Posted by Andy Edinborough on January 29, 2010

Yahoo doesn’t offer much help to .NET/C# developers when it comes to getting started with using their API’s and OAuth.  So I’ve put together a quick-hit starter pack.

  1. Yahoo! YQL Console
    This is fun for all ages!  I just get all giggly when I see all that Yahoo has made available through YQL (Yahoo Query Language).  You can use this tool to perfect your queries and figure out just what you want to accomplish.  As a supplement, you can check out the PDF Documentation as well as the online version.
  2. My Projects @ Yahoo Developer Network
    Once you’ve got your base application logic in place, you can request the keys you’ll need to communication with Yahoo using OAuth.  This will let you take advantage of the higher usage limit of 100,000 requests / day and 10,000 requests / hour.
  3. Simple C# OAuth Code
    Unfortunately, the C# OAuth libraries listed at http://oauth.net/code/ are incredibly lacking in common-sense and simplicity.  The best project I’ve found was http://www.dotnetopenauth.net/ which is a 9MB download…. really?  Guys, it doesn’t need to be that complicated.  Another very basic class found at http://oauth.googlecode.com/svn/code/csharp/ actually has a method defined as:

    public string GenerateSignatureUsingHash(string signatureBase, HashAlgorithm hash) { 
    	return ComputeHash(hash, signatureBase); 
    }
    Really?  Wow.  All this is why I wrote a very basic implementation of OAuth for two-legged authentication.
  4. Finally, you can download a simple test project that brings all this together: 

Good luck, and have a nice day. :]]

Categories: Code
Tags: c#, oauth, yql, yahoo

« C# OAuth Implementation
C# Imap and Pop3 Library »