The Node.js app uses the 3day daily forecast API. That particular API is not enabled to the free TWC API key used in 2022. The example doesn't work. Instead of the 3day, the library should call the 10day that is enabled.
|
options['uri'] = `${apiUtil.HOST}/v1/geocode/${lat}/${lon}/forecast/daily/${d}day.json` |
$ node app.js
401 - "<HTML><HEAD>\n<TITLE>Access Denied</TITLE>\n</HEAD><BODY>\n<H1>Access Denied</H1>
You don't have permission to access \"http://api.weather.com/v1/geocode/35.843686/-78.78548/forecast/daily/7day.json?\" on this server.
<P>\nReference #18.58403617.1663595389.2c7d2441\n</BODY>\n</HTML>\n"
The Node.js app uses the 3day daily forecast API. That particular API is not enabled to the free TWC API key used in 2022. The example doesn't work. Instead of the 3day, the library should call the 10day that is enabled.
weather-api-nodejs/lib/daily-forecast.js
Line 24 in cf23ce6