Issues with openweathermap


I have signed up and received API,7f9fa5da26147f0ded1e822f103d45a4.

I trying to use the key but I am getting an error “Invalid API key. Please see for more info.”

And here is my code fetch(‘${searchMethod}=${searchTerm}&APPID=${appId}&units=${units}’)

Can you do us a favor and console.log the url you are fetching?

It appears you are not surrounding your url string with backticks. Instead, it appears you are using single quotes.

Hello @RandellDawson

function searchweather(searchTerm){

fetch(‘${searchMethod}=${searchTerm}&APPID=${appId}&units=${units}’).then(result =>{
return result.json();
function init(resultFromServer)


That is not a template literal. You need to use backticks instead of single quotes.

Thanks for the feedback but I am still getting an error.