-
-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I got API by register but not work error: Invalid API key #46
Comments
For everyone reading this in the future: It can take "a couple of hours" until your API key is activated (see https://openweathermap.org/faq#error401). Hi @altaihero, does calling the following URL in your browser work for you (replace the X's by your api key)? http://api.openweathermap.org/data/2.5/weather?q=Berlin&APPID=XXXXXXXXXXXXXXXXXXXXXXXX |
Hi @cmfcmf i was't use xxxx in APPID xxxx is just example. |
Ok cool! |
at now, it continue just like that... |
Hi @marlonlom! Does the problem persist? Does calling Let me know if it works now! |
Hi @cmfcmf, I am now having this issue. I can successfully navigate to http://api.openweathermap.org/data/2.5/weather?q=Manchester,UK with my API key. But any of the historical calls I make are returning an Unauthorised error Kind regards, |
Hi @georgeharnwell, are you on a free account? The historical weather condition api is not free, see http://openweathermap.org/price (it was free months (years?) ago but isn't anymore). |
Hi @munkh-altai You should use appid not APPID |
thank you all. My problem solved. ;-) |
i'm calling it with appid={key} and it doesn't work ! this must be some kind of bug and failure in the API |
If the key doesn't work after a few minutes, try contacting the OpenWeatherMap team. I can't really help with that. 😕 |
I tried the answers above but to no avail. 👎 |
Yup, me too. The suggestions here haven't worked |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
If you are a new start,it need ten minutes or more time before the key can use |
http://samples.openweathermap.org/data/2.5/weather?q=Lahore,PK&appid=542ffd081e67f4512b705f89d2a611b2 |
@Naveed-anwar123 you are using the |
Caution : Notice the difference between opostrophe and grave key 출처: http://booolean.tistory.com/755 [boolean] |
Hi im haveing the next error: im trying to consume two diferent services: 2- api.openweathermap.org/data/2.5/forecast?APPID=xxxxxxxxxxxxxxxxxxx&lat=10.9883696&lon=-74.8051523&units=metric both are working on postman and web browser, but when i use it on my project i allways get 401 error. on my front im useing laravel with vue + axios.get the problem persists on front and back api calls. other importrant point, im using laravel homestead(vagrant) for develipong |
Could you please post the code you are using? |
It is now working thanks, i made some changes in the code
El sáb., 9 de jun. de 2018, 09:31, Christian Flach <[email protected]>
escribió:
… Hi im haveing the next error:
Could you please post the code you are using?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#46 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHMmYbLwdMrlQk9gryLDzJZrZ_3jKIWDks5t69xPgaJpZM4GMg_V>
.
|
what changes did you make? |
{"cod":401, "message": "Invalid API key. Please see http://openweathermap.org/faq#error401 for more info."} I am using valid api key still its not working please help |
If you just signed up, the automated email says that key will be activated in couple of hours. You should check back after couple of hours |
sorry, this is too old, i dont remember |
Maybe it's just that you have to wait around 30 minutes to start using a new APPID, that happened to me. |
just wait for sometime(15 mins approx) after you signup or generate a api key, before calling the api 👍 |
You get this if trying to access a paid/premium service. Look for the free ones! |
Remove https:// and just use |
this worked for me! thanks! I changed APPID to appid in Postman and the weather data replaced the error message |
The major problem is, it takes couple of hours to activate the API |
hey guys. As mentioned before, I cannot get a request through my terminal as it says Invalid API key. But it does work through my browser. curl -v http://api.openweathermap.org/data/2.5/weather?q=Berlin&APPID=MYAPIKEY - This is how I do it through my terminal. Is that wrong? Many thanks for help. |
Hey guys. My solution is
|
Hi! For me your link works, (I know the 15-30 minutes of waiting from the creation). Please help me... If it could be useful, the script is here: https://github.com/DelManari/AR-Weather |
you need to wait just 10-15 minutes because it will take time to activate your API key. after that you can use it as follow, https://api.openweathermap.org/data/2.5/weather?q=London&appid=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx for me it worked perfectly! |
I know the 15-30 minutes of waiting from the creation |
… so we temporarily use a key from this one cmfcmf/OpenWeatherMap-PHP-API#46
This is a working template - https://api.openweathermap.org/data/2.5/weather?q=Kharkiv&units=metric&APPID=XXXXXXXXXXXXXXXXXXXXXXXX. |
it turns out that after creating a new Api key, you just have to wait for a few mins before activiation |
hmm been waiting 2 hours, still getting the same error |
{ how i can solve the issues. |
{cod: 401, message: 'Invalid API key. Please see http://openweathermap.org/faq#error401 for more info.'} |
While working with flutter I have the same issue. and hitting from the mobile URL will be changed to So after /data/2.5/weather use the query parameter while hitting the API for Flutter it is solved below: |
Unfortunately whoever downvoted that person who said it can take two hours was downvoting in vain. OpenWeatherMap themselves say that it can take a few hours for an API key to be valid. Why it takes so long is beyond me but I hope this helps somebody. |
Had the same issue, took about 20 mins before the API key started to work. |
I too had the same issue, took about 10 mins before the API key started to work. |
I got api by free register and i added my api to $weather = $owm->getWeather('Berlin', $units, $lang, 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); xxxxxxx is my api but i got error
OpenWeatherMap exception: Unknown fatal error: OpenWeatherMap returned the following json object: Invalid API key. Please see http://openweathermap.org/faq#error401 for more info. (Code 0).
The text was updated successfully, but these errors were encountered: