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


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




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.
ydn5.png


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


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.

-i

, , ,
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

Subscribe


RSS Feed

My Other Web Sites

Igor and Elise's Travels
Riverside Expressway Cam
StrFunc() Online
300 George St Blogumentary
Guru JSON-RPC Tester
Extrudifier Object Designer

Recent Blog Posts

NeoOffice Viewer macOS Word Document viewer vs Preview and Microsoft Word

Importance of cleaning the internal fans and heatsinks in a MacBook Pro

Adding an email subscribe feature to your Blog with Blogtrottr

How to remove Google's logo from your G Suite applications

Pedestal fan transformed into a ceiling fan

Testing the Velvet WiFi Hotshot signal strength

Improving slow download speeds on the PS4 and PSN

Add batch image resize functionality to macOS using Automator

Show transfer percentage and speed when copying files in Linux and Bash

So I finally got to try eating some space food

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

Friends

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

Blog Activity

Blog Activity
Please follow me on...