Igor's Blog

Yahoo has effectively shut down it's Weather API by forcing everyone to use OAuth 1.0 in order to access its data. Not only has this been done for the YQL API but it also applies to the Weather RSS feed! Previously this has been a public API but as of a few days ago it stopped working completely and requires authorisation.
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">
Please provide valid credentials. OAuth oauth_problem="OST_OAUTH_PARAMETER_ABSENT_ERROR", realm="yahooapis.com"
Please provide valid credentials. OAuth oauth_problem="OST_OAUTH_PARAMETER_ABSENT_ERROR", realm="yahooapis.com"

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.

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".

ydn1.png ydn2.png

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.


, , ,
About — I'm an enthusiastic software engineer and consultant interested in many fields including J2EE, programming, electronics, 3D printing, video games, wood working and gardening.
See my Resume for more information.
The views expressed in this blog are my own and not those of my employer.
comments powered by Disqus
My other posts you may like...
Programming, DIY, Games, Hacks, Tech and more.
Follow me on...
Current and Past Projects
See my Resume


RSS Feed

My Other Web Sites

Igor and Elise's Travels
Riverside Expressway Cam
300 George St Blogumentary

My Online Tools

UUID to OID Converter
Guru JSON-RPC Tester
Extrudifier Object Designer

Recent Blog Posts

WebLogic package-name element classpath generator script

Using Jersey 2.x as a shared library on WebLogic 12.1.2

Google DFP with AdSense fallback is causing infinite scroll pages to go haywire

Workaround for Mobile Safari scrollTop() not updating during scroll

Skipping execution of Maven plugins that do not have a native skip option

Unmarshalling an XML fragment representing a JAXB object without XmlRootElement

Injecting a ContainerRequestContext into a Jersey entity provider class

Obfuscating PHP source code with Maven and YAK Pro PO

Making use of corner shelves with easy to make slide out draws

Octotree breaks GitLab Issue Boards

Recent Galleries

Space Food - Chocolate Ice Cream with Chocolate Chips

Legeod Star Wars AT-DP kit

DIY spare parts computer build with a RAIDMAX Anura case

Fake 'Lepin' brand Lego packaging

Hardwood garden bench with clear resin void filler

Fixing a 3D printer extruder that stopped heating up

Easily increase disk space in a Lenovo Ideapad 100S 14" laptop with an M.2 SSD

Making a multi-piece 3D printed solder spool holder stand

DIY indoor apartment grow light wiring

Good Friday Electronics fun Easter Bunny LED PCB Kit IBEABU-01.0

Top Categories

Blogs I follow

Matt Moores Blog
Georgi's FlatPress Guide
Perplexing Permutations
The Security Sleuth


RAWS Parts Online
Alpha Dimensions Hosting
Kristensen Photography
Ilia Rogatchevski
Travelling Fairy

Blog Activity

Blog Activity
Follow me on... 
...or subscribe for updates!

Don't show this again