Looks like Yahoo re-enabled public access to this API. Read more about that here. I've also put an example on how to use this API here.
This is the kind of error message that the RSS feed returns...
Yahoo Error Message
<yahoo:error xmlns:yahoo="http://www.yahooapis.com/v1/base.rng" xml:lang="en-US" yahoo:uri="http://yahoo.com">
<yahoo:description>
Please provide valid credentials. OAuth oauth_problem="OST_OAUTH_PARAMETER_ABSENT_ERROR", realm="yahooapis.com"
</yahoo:description>
<yahoo:detail>
Please provide valid credentials. OAuth oauth_problem="OST_OAUTH_PARAMETER_ABSENT_ERROR", realm="yahooapis.com"
</yahoo:detail>
</yahoo:error>
In my mind this is complete madness for a weather API! Further, the weather API only supports OAuth 1.0 so it is not possible to pre-create an authorisation token (like you would for a server only app), you always have to have a redirect URL and have the user agree to get their data - but what user data does a weather API need? None! There is absolutely no need for a user to 'authorise' weather data since it is not their data in the first place and typically anything that displays weather does not require any kind of user interaction.
This change by Yahoo means that projects like yahoo-weather-java-api no longer function. It also means that my own JPhotoFrame project can't fetch weather data for the time being.
I moved all the weather code from Yahoo to OpenWeatherMap API today for my JPhotoFrame project. The change is fairly straight forward though you do have to process data more. You can look at commit 7a8c7f3123d587cae841bcc2705cce673358e047 for details of the changes required.
This post may also be useful: A simple OpenWeatherMap example in Java.
This post may also be useful: A simple OpenWeatherMap example in Java.
The documentation page states "To increase the security measure and better serving our YDN customers, weather data source will enforce OAuth 1 starting March 15, 2016. Please update your API calls with OAuth 1 enabled (via the OAuth /v1/yql end point if using YQL) using your Yahoo App key and secret."
Now that would have been great if the rest of the examples on that page were updated to the new approach, but they still use the public API in the examples! The very API that they have disabled! Way to go Yahoo.
Trying to find more information in Yahoo Developer Network was also unsuccessful. About 8/10 times I would either get an error page saying "An internal error occurred" or pages that would half-load or just a placeholder page saying "Will be right back...Thank you for your patience. Our engineers are working quickly to resolve the issue".
So way to go Yahoo! Not only have you crippled and locked away an API that should have always been public but you failed to update documentation and examples for the new way to access the API and on top of that the documentation was not even reachable majority of the time!
The good news is I will be switching JPhotoFrame to use OpenWeatherMap.
-i