1

There are 1 answers

0
aliadly On

I do not know exactly how you called the API, but I got the same error when I passed the zip code as a parameter. So I changed it to use id instead and it worked for me like this

 var queryString =
    'http://api.openweathermap.org/data/2.5/weather?id='
    + cityId+ ',us&appid=' + OpenWeatherAppKey + '&units=imperial';

you can try this for example for New York city:

http://api.openweathermap.org/data/2.5/weather?id=5128581,us&appid=yourkey&units=imperial

you can get the id from this site for example New-york-city:

http://www.geonames.org/5128581/new-york-city.html

openweathermap also provides alternative ways to get the weather using id,zip code ,lat long , ...etc

check this