CICCIOSGAMINO / openweather-apis

Simple APIs for OpenWeatherMap.org basic services
GNU General Public License v3.0
44 stars 27 forks source link

Invalid API key #25

Closed zachskaggs closed 6 years ago

zachskaggs commented 6 years ago

Sorry to bother anyone, just looking for some assistance. I'm using the same API keys as in a PHP project I have that is working just fine, but I keep getting an invalid API key error on the key when using openweather-apis. Any idea what I could be doing wrong?

var weather = require('openweather-apis');

weather.setLang('en');
weather.setZipCode(37323);
weather.setUnits('imperial');
weather.setAPPID('my-key');

weather.getWeatherForecastForDays(3, function(err, obj){
    console.log(obj);
});
vikasrajbhagat commented 6 years ago

Hi ,

You need to register and get an API Key from the website. The API key will be replaced with "my-key" in the above code.

Hope this helps.

zachskaggs commented 6 years ago

@vikasrajbhagat I understand that, I input my API key and it works on another project, I just didn't want to input it here in the public issue. The same API that works in a PHP project I'm using doesn't work in this node implementation and I can't figure out why.

zachskaggs commented 6 years ago

I have no idea what I was missing, but i started over from scratch and it worked, so closing this issue. thanks!

CICCIOSGAMINO commented 6 years ago

Thanks ... i've just seen your issue !! Happy to get close