Akylas / oss-weather

An OSS weather app for iOS/Android

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Invalid API key error

shombando opened this issue · comments

I'm getting the following error

Error
Invalid API key. Please see https://openweathermap.org/faq#error401 for more info.

I have created an open weather map account and have used the default key, created a new key, waited several days between account creation and new key creation before using the keys. But I continue to get the same error. I've verified I'm copying and pasting the full key correctly.

Do you have any recommendations?

@shombando sadly i think owm changed their rules on accessing one call api with free api key. Not much i can do :s
I might look at not using one call api in the future, but it will take me time

@farfromrefug thanks for the info. In the meantime, it might be a good idea to remove the pop-up asking the user to enter an API key.

@shombando well still works with old API keys :s

Unfortunately it works not with old api keys. The popup will show anyway. Really annoying.

@topcaser sorry but i tested again with my key and it works fine. At some points they changed api keys and they dont support the single call API. I dont plan on implementing differently, it would requires many http requests which is slow and uses too many resources (not environmentally friendly).
Plus now there is Open-Meteo

@topcaser sorry but i tested again with my key and it works fine. At some points they changed api keys and they dont support the single call API. I dont plan on implementing differently, it would requires many http requests which is slow and uses too many resources (not environmentally friendly). Plus now there is Open-Meteo

I've noticed that open-meteo is far inaccurate in certain parts of some countries.

I got this error with 3 years old api keys too. Maybe we should remove the API 2 as it does not work as intended any more, and add a clearer warning message for users? (it can be very frustrating to think your api key is invalid :))

FYI I ended up subscribing (for free, and limiting to 1000 calls to be sure it stays free), after 15min it worked, using onecall API 3.0

I got this error with 3 years old api keys too. Maybe we should remove the API 2 as it does not work as intended any more, and add a clearer warning message for users? (it can be very frustrating to think your api key is invalid :))

FYI I ended up subscribing (for free, and limiting to 1000 calls to be sure it stays free), after 15min it worked, using onecall API 3.0

I will try to do the subscription thing, like you mentioned. I'm assuming this is what your subscription page looks like.
image

@jacobgonzales20 Exactly!
You can check if it's activated using the api directly meanwhile (for example https://api.openweathermap.org/data/3.0/onecall?lat=SOME_LAT&lon=SOME_LNG&exclude=&appid=YOUR_API_KEY )

@bonswouar but you need to add a credit card for that subscription right?

from my experience yes, you could always add a visa gift card

Right, or you can use a virtual card from some online banking app and cancel it right away (single-use virtual cards aren't accepted though)