Examples' WeatherForecast.php returning error 'Invalid API key (401)' because default forecast is requiring Premium API key.
Pierr0t63 opened this issue · 1 comments
Pierr0t63 commented
Hello,
First, thanks for your work, unfortunately I've been encountering some issue while trying the examples files provided in Examples/ :
WeatherForecast.php returns, by default :
Cmfcmf \ OpenWeatherMap \ Exception (401)
Invalid API key. Please see http://openweathermap.org/faq#error401 for more info.
After some investigations, the problem seems to come from the default value of the 'days' argument, which is 10 and require a Premium API key from OpenWeatherMap (located at line 32).
It would be more 'noob-friendly' to set it to 5 days, which the maximum for a Free API Key.
cmfcmf commented
Hi @Pierr0t63,
thank you for your valid suggestion! I've changed the value inside the examples to 5 in #112.