I’ve been playing around with the OpenWeatherMap API to learn to code and have run into a series of TypeError issues popping up in my console. My assumption is that my program is attempting to use data from the API before it is finished fetching, but I have set the fetch functions up to wait until receiving a response to
Tag: openweathermap
Can’t access API-key from .env-file
We are having problem accessing the API-key from our .env file when trying to fetch in our server.js. If we add the API-key manually to the URL in server.js it works, so the problem seems to be the connection between server.js and .env-file. We have npm installed dotenv. In the .env file we have written the key like this: WEATHER_API_KEY
OpenWeather Api Using JavaScript Fetch With User Input Keeps Previous Data in HTML Page
I’m using JavaScript Fetch to get Data from OpenWeather Api. I have a form for users to input the City whose weather information they want to see. For some reason, the data from the previous city still pops up in the HTML page instead of disappearing for the new data to take its place. How do I clear the memory
error 401 : unauthorized, received even after using API key while using www.openweathermap.org
Hi I am buliding my first web app using javascript and fetching data using API from www.openweathermap.org/ I have used the API key as mentioned in the documentation still it is giving an error of unauthorization. Can there be any other reason for this error while calling a function or so . Thank you in advance. Answer It’s the spaces