The plugin says the API key is wrong, but it is correct. #1

Closed
opened 2022-10-27 19:26:59 -04:00 by WeltensiedlerDE · 1 comment
WeltensiedlerDE commented 2022-10-27 19:26:59 -04:00 (Migrated from github.com)

Is there maybe a problem with the country code DE and the german zip code 34134 instead?

Here is the error log:

[00:23:14] [Server thread/INFO]: [RealTimeWeather] Enabling RealTimeWeather v1.1.1
[00:23:14] [Server thread/INFO]: [RealTimeWeather] Starting...
[00:23:14] [Server thread/ERROR]: [RealTimeWeather] Error when getting weather information: API key incorrect
[00:23:14] [Server thread/ERROR]: [RealTimeWeather] Please check that the values set in the config file are correct
[00:23:14] [Server thread/INFO]: [RealTimeWeather] [DEBUG] Configuration error
[00:23:14] [Server thread/ERROR]: [RealTimeWeather] Disabling weather sync...
[00:23:14] [Server thread/INFO]: [RealTimeWeather] [DEBUG] Enabling metrics...
[00:23:14] [Server thread/INFO]: [RealTimeWeather] Started!

And here is my config. I have just replaced tie api key for posting here. On my server the config has a correct api key from openweathermap.org:

SyncTime: false
Timezone: 'America/New_York'
SyncWeather: true
APIKey: 'JUSTREPLACEDFORPOSTINGTHEISSUE'
ZipCode: '34134'
CountryCode: 'DE'
Debug: true

I have replaced all comments, because the markdown of the editor makes the font size really big.

Is there maybe a problem with the country code DE and the german zip code 34134 instead? Here is the error log: ``` [00:23:14] [Server thread/INFO]: [RealTimeWeather] Enabling RealTimeWeather v1.1.1 [00:23:14] [Server thread/INFO]: [RealTimeWeather] Starting... [00:23:14] [Server thread/ERROR]: [RealTimeWeather] Error when getting weather information: API key incorrect [00:23:14] [Server thread/ERROR]: [RealTimeWeather] Please check that the values set in the config file are correct [00:23:14] [Server thread/INFO]: [RealTimeWeather] [DEBUG] Configuration error [00:23:14] [Server thread/ERROR]: [RealTimeWeather] Disabling weather sync... [00:23:14] [Server thread/INFO]: [RealTimeWeather] [DEBUG] Enabling metrics... [00:23:14] [Server thread/INFO]: [RealTimeWeather] Started! ``` And here is my config. I have just replaced tie api key for posting here. On my server the config has a correct api key from openweathermap.org: ``` SyncTime: false Timezone: 'America/New_York' SyncWeather: true APIKey: 'JUSTREPLACEDFORPOSTINGTHEISSUE' ZipCode: '34134' CountryCode: 'DE' Debug: true ``` I have replaced all comments, because the markdown of the editor makes the font size really big.
Jack1424 commented 2022-10-27 23:01:22 -04:00 (Migrated from github.com)

The configuration values seem to work for me. If you recently generated that API key, you might have to wait a bit (usually a couple of hours) before it becomes valid.

If you want to confirm whether it's a problem with the plugin or not, go to this address in any web browser:
https://api.openweathermap.org/geo/1.0/zip?zip=34134,DE&appid=[YOUR_API_KEY]
(replace [YOUR_API_KEY] with your API key)

If your API key is valid, you should get a response like this:
{"zip":"34134","name":"Kassel","lat":51.2878,"lon":9.4705,"country":"DE"}

If it isn't, you'll get a response like this:
{"cod":401, "message": "Invalid API key. Please see https://openweathermap.org/faq#error401 for more info."}

Please let me know if this solution works so I can help you out or close the issue.

The configuration values seem to work for me. If you recently generated that API key, you might have to wait a bit (usually a couple of hours) before it becomes valid. If you want to confirm whether it's a problem with the plugin or not, go to this address in any web browser: https://api.openweathermap.org/geo/1.0/zip?zip=34134,DE&appid=[YOUR_API_KEY] (replace [YOUR_API_KEY] with your API key) If your API key is valid, you should get a response like this: `{"zip":"34134","name":"Kassel","lat":51.2878,"lon":9.4705,"country":"DE"}` If it isn't, you'll get a response like this: `{"cod":401, "message": "Invalid API key. Please see https://openweathermap.org/faq#error401 for more info."}` Please let me know if this solution works so I can help you out or close the issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: minster586/RealTimeWeather#1
No description provided.