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

comments powered by Disqus
Other posts you may like...
Programming, DIY, Games, Hacks, and Tech

Recent Blog Posts

Converting a CSV file containing commas in quotes to a pipe separated file using Awk and Bash

How to get Facybox gallery popup to work for images with dynamic URLs

jQuery UI Photoboxr plugin updated to version 0.2

Learn How to Add Disclaimer to All Outgoing Emails in Office 365

How to securely host your web site for free with Google Cloud and CloudFlare (part 3)

How to securely host your web site for free with Google Cloud and CloudFlare (part 2)

How to securely host your web site for free with Google Cloud and CloudFlare (part 1)

Beware of the subtle difference in date format strings between MySQL and SQLite

Postman reporting Unexpected 'N' error in response body

Adding extra shelves to the Ikea Detolf display cabinet

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

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
Please follow me for more great content!
     
Don't show this again