AERIS forecast error

I have a problem that when I select the AERIS forecast, I get this error message.
I don’t understand why, I entered the AERIS API and secret key correctly.

Hi Brett,

Welcome to the forum.

To investigate these kind of problems one needs the URL to your website.

Inside the html there are messages, also there is a test mode to run to get more info.

Without access to your website support is impossible.

If you want to investigate yourself, run . . ./pwsWD/PWS_module_test.php
Top row buttons → middle one, select fct_aeris_block.php and click “Test-it”
Maybe there are erros.
Otherwise right-click inn the large area and a choice like “View Frame source” to inspect the html. The names of the choices are browser dependent

If that does not give a clue, press the bottom row middle button.
“Load external files. Important this can take more than 10 seconds”
All outdated files will be loaded, also the Aeris ones.
Maybe there is an error message there.

Check the file-contents by using the middle-row → left button.
Select jsondata/aeris_fct_dp.json or jsondata/aeris_fct_hrs.json or jsondata/aeris_ccn.json
If these files are not there, there should have been an error

Wim

@ ALL
It would be far more easier if everyone with every post included the URL to their website. Then more persons can and will help.
There is ample space for that in your Avatar. It makes checking easier .

HI Wim!

Link: https://weather-szolnok.hu/pwsWD/index.php

Contents of the files:

{“success”:false,“error”:{“code”:“insufficient_scope”,“description”:“The client provided is not authorized to access the request.”},“response”:}

API documentation → Insufficient_scope
Valid OAuth credentials were provided, but the user is not allowed access to the data due to privacy restrictions or account level.


I used the link from the load files tab
PWS_load_files.php (470) Aeris_hourly__: File not old enough (297/600 seconds)
https://api.aerisapi.com/forecasts/47.17,20.18?format=json&client_id=_API_SETTING_&client_secret=_API_SETTING_&filter=1hr&limit=26

Substituted my id and secret codes, it works correct, large forecast returned.


Check your . . ./pwsWD/_settings/settings.php
Two lines (araound 98) look like this

      $aeris_access_id = 'xxxxxxRZn35FT7X7xxxx';
     $aeris_secret_key = 'blabladzeadzublF7xlK0yaPDeahLHUQG891bla';

Are they correct with your Aeris Dashboard?


The words “account level” in the API documentation do me wonder:
Are you still uploading to pwsweather?
Waht is your pwsstation-name?
if your https://www.pwsweather.com station data is not current, you do not have access to Aeris forecasts nor to other Areis goodies like maps a.s.o.

Wim

Yes, I am constantly uploading data to pwsweather. Working perfectly.

PwsWeather

$aeris_access_id = ‘xxxxxxRZn35FT7X7xxxx’;
$aeris_secret_key = ‘blabladzeadzublF7xlK0yaPDeahLHUQG891bla’;

Yes, looks like!

I think the problem is on the AERIS side. I tried to login with my AERIS ID and it says “wrong password”. I typed it right though. I requested a “forgot password” email. It was not sent. :frowning: I will contact them.

Then you have to check your Aeris weather dashboard as the insufficient_scope message is clear.

Valid OAuth credentials were provided, but the user is not allowed access to the data due to privacy restrictions or account level.

Did it all worked OK in the past?

Wim

Yes. Back in 2016, I requested an API for my other website at the time. I haven’t used it for a long time, I just tried again with this pwsWD website. MY API code may have expired.

I requested a new API and secret key from AERIS. Now working! Thanks for help!