Igor's Blog
Programming, DIY, Games, Hacks, and Tech

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.


comments powered by Disqus
Other posts you may like...

Recent Blog Posts

A hack to create an uber jar with the Maven Shade Plugin using local jar files

Is it worth it? Apple USB-C Digital Multi AV adapter vs a cheap eBay clone

Running X11 graphical applications after changing to another user using 'sudo su'

How to stop Facebook using ad images as post sharing thumbnails

Picking lists for Atari Lynx capacitor replacement kits

Performance - 2012 Retina MacBook Pro vs 2017 MacBook Pro

Look and feel - 2012 Retina MacBook Pro vs 2017 MacBook Pro

Using math to work out the diameter of hard to reach water cooling pipes

How to get the unreachable shard in the Hinterlands in DragonAge Inquisition

Measy RC12 wireless 2.4Ghz keyboard touchpad review

Recent Galleries

Monument Valley 2 is released and does not disappoint

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

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
Travel ┬ÁBlog

Blogs and Friends

Matt Moores Blog
Georgi's FlatPress Guide
Perplexing Permutations
The Security Sleuth
Ilia Rogatchevski
Travelling Fairy

Blog Activity

Blog Activity
Don't forget to
me for more great articles!
Don't show this again