The Yahoo! Developer blog has an entry entitled Introducing the Yahoo! Mail Web Service which states

While we are certainly proud of the success of Yahoo! Mail, today we are announcing how we are going beyond the boundaries of the Yahoo! network and enabling developers to build new tools or applications around Yahoo! Mail. We are thrilled to announce the open availability of the Yahoo! Mail Web Service, web service for Yahoo! Mail (accessible via SOAP or JSON-RPC) that we previewed to Yahoo! Hack Day attendees. With the Yahoo! Mail Web Service, you can connect to the core mail platform to perform typical mailbox tasks for premium users such as list messages and folders, and compose and send messages (you can also build mail preview tools for free users with limited Web Service functionality). In other words, developers outside of Yahoo! can now build mail tools or applications on the same infrastructure we use to build the highly-scaled Yahoo! Mail service that serves nearly 250 million Yahoo! Mail users today -- users who might want to help you make some cash with your application.
...
The Yahoo! Mail Web Service is a big release for Yahoo! and the Internet, and it's only the beginning of what you'll be seeing from Yahoo!. Jump into our code samples for Java, .NET, PHP, Perl and Python, and build your dream mail app today, then be sure to give us feedback on your experience so we can continue to make the API even better. Be sure to leverage the online Yahoo! Mail Web Service support group where you can get help from the Yahoo! Mail Web Service team and your fellow developers. We can't wait to see what applications you will build when you add your imagination to the platform. Maybe you want to build an application that backs up Yahoo! mail targeted at a large number of Yahoo! users, or maybe you just want to add a niche feature that makes Yahoo! Mail better for your mom. For inspiration, we've gathered a few applications:

First things first, this is an unprecedented and very welcome move on the part of Yahoo! This is another example of why I think of the three major Web portals, Yahoo! has done the best job of turning their services into a developer platform. I like the fact that the Web service is exposed over multiple protocols and the code samples are in multiple programming languages that run the gamut from enterprise developer fare (Java/.NET) to Web geek fare (Perl/Python/PHP). Mad props to the developer platform folks at Yahoo!, good work.

With that out of the way, there is some stuff that has me scratching my head after taking a look at the Yahoo! Mail Web Service User Guide and API Reference. The first thing that is weird is that although Yahoo! provides SOAP and RESTful JSON web services for accessing one's mail, I still can't get POP access to my Yahoo! mail without shelling out $20/year. After all, GMail has POP access for free and users of the free versions of Windows Live Hotmail can get POP-like access if they use Windows Live Mail desktop although they are restricted to using one mail client.

So I decided to see if the Yahoo! Mail Web Services provides a way around this restriction but found out from the section on "Determining the Users Account Capabilities" that

The Yahoo! Mail Web Service limits the functionality available to free accounts. Premium accounts have no such limits. First call the GetUserData method to get the user’s account type from the web service.
Calls to other APIs will return an error.

So it looks like I actually can't build an application that can be used to read the actual mail messages from my Yahoo! Mail account with the API unless I'm a premium user. Otherwise, all I can do is list the messages but not actually get their content. That makes the APIs a lot less cool than I initially thought. 

Like Sam Ruby and Paul Downey I initially wondered about the choice of exposing a SOAP API but then realized that it may be that they already use SOAP internally so this wasn't that much work for them in that case. I also wondered about the lack of a RESTful non-SOAP XML interface as well but after looking at the complex object models I can see why they went with data formats that are pretty much serialized object models (i.e. Javascript OBJECT Notation & Simple OBJECT Access Protocol) instead of expecting developers to write a bunch of gnarly XML parsing code for processing over a dozen different response formats from the 23 methods in the Yahoo! Mail Web Service.

I suspect that Yahoo! won't get as much traction as they expect with the API until they remove some of the restrictions on non-premium accounts. Even then it does look like there is enough to build Windows and Windows Live gadgets for Yahoo! Mail that show your messages. Except that there is no way to read the mail contents and not even a way to link to the message in way that sends the user to Yahoo! Mail to read its contents. I bet if Yahoo! fixed the latter and perhaps had a rev-share with people who drove clicks back to the Web-based mail client, things would get very interesting. I wonder if Jeremy is listening?


 

Thursday, 29 March 2007 17:13:37 (GMT Daylight Time, UTC+01:00)
If Yahoo gave a link to the email message, one could build a tool that simulated POP by listing all email messages, then going to each link and extracting the message. If they offer POP or any near equivalent, there's little reason to pay for their premium service.
Thursday, 29 March 2007 18:56:46 (GMT Daylight Time, UTC+01:00)
Well, there's nothing like the hard-nosed reality of web business models to get in the way of useful APIs.

Regarding the SOAP interfaces, we've seen this problem with other in-house systems going public: amazon EC2, some of the BT services that Paul Downey has to deal with. These SOAP APIs work, but only with the specific SOAP stacks they were built against...when you open them up to the outside you discover interop problems you can avoid inside a single company -for a limited periof of time.
Thursday, 29 March 2007 19:36:18 (GMT Daylight Time, UTC+01:00)
If you look in the documentation, there is a URL you can build that will take the user to Yahoo! Mail to read the message.

As for SOAP, we've definitely seen interop problems. During Open Hack Day we were at v1 of the service. We found some interop problems in how we did doc/literal wrapped, that was causing issues with Java and .NET SOAP stacks. We fixed those, which is why we now have a v1.1 of the service.

You're right about why we have SOAP. It was our first interface, built to accomodate the Oddpost guys when they were acquired. JSON-RPC was really easy for us to add, I think I did it in an evening after about an hour of work. We could add other RPC-type bindings pretty easily. I've poked around at doing XML-RPC, but we haven't finished the work on that. If people show interest, I imagine we'd go ahead and finish it off.

As for REST, we don't have it right now just because there's been no demand. I'm hoping that developers speak up about what they want in the mail web service. If we get enough people asking for REST, I could imagine us adding a true REST service.

Ryan Kennedy
Yahoo! Mail Web Service
Thursday, 29 March 2007 19:51:39 (GMT Daylight Time, UTC+01:00)
Ryan,
Thanks for pointing that out. On rereading the documentation I see a section titled "Linking Directly To a Message" which for some reason doesn't show up in the Table of Contents. Y'all might want to fix that.
Thursday, 29 March 2007 20:00:49 (GMT Daylight Time, UTC+01:00)
Hmm.. I'm actually able to check my Yahoo mail via POP (and have done for years) despite having a free account. The only catch is that I had to sign up for something called "Yahoo Alerts" that allegedly occasionaly sends you an email, but I can't remember ever seeing anything from them.

Admittedly, I am from the UK: maybe this service is not offered in the USA?
Max
Thursday, 29 March 2007 20:23:00 (GMT Daylight Time, UTC+01:00)
Related to why Yahoo doesn't have free POP access: Why can't I check my hotmail (http) through Vista's Windows Mail. dumb
annoonnn
Thursday, 29 March 2007 21:44:10 (GMT Daylight Time, UTC+01:00)
Yeah, I don't really get the Y! Mail APIs. Looks like a reinvention of IMAP.
pwb
Thursday, 29 March 2007 22:15:34 (GMT Daylight Time, UTC+01:00)
The web service is more full featured than IMAP. Our search is more expressive and powerful, we provide the ability to tweak mailbox preferences, we allow you to trigger fetching mail from your configured external accounts, we provide the ability to send mail, etc. We also normalize all data to UTF-8, taking the guesswork out of character sets, and we strip out malicious JavaScript attacks. You won't get that from IMAP.

IMAP is great if all you want to do is read your mail. If you really want to break out of the mold of classic mail applications, however, IMAP can be found quite lacking.

Ryan Kennedy
Yahoo! Mail Web Service
Friday, 30 March 2007 01:18:17 (GMT Daylight Time, UTC+01:00)
> We also normalize all data to UTF-8, taking the guesswork out of character sets, and we strip out malicious JavaScript attacks. You won't get that from IMAP.

You could, of course, provide all of those features via IMAP. You choose not to.
Monday, 02 April 2007 22:39:45 (GMT Daylight Time, UTC+01:00)
Rather than "not enough" I tend to think this is a great deal better than "nothing", and unless you know of something you can't talk about, I'd rather read a post detailing how Windows Live Hotmail is going to open up even half as much. So far Yahoo is kicking MS and the only thing keeping me with Live Messenger is Windows Live Domains and the fact I can't read Hotmail in anything other than Windows Live Desktop Mail (beta!) or my browser.
Doug
Comments are closed.