-
Notifications
You must be signed in to change notification settings - Fork 9
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
Since 2023/12/04: Unable to refresh the access token #28
Comments
Same sh*t. |
Found out, that the error is a: |
Although I haven't found any official statements, it looks like Netatmo is now refreshing BOTH the access token AND the refresh token when token is refreshed (so the previous refresh token is now invalid). Standard Oath2 behavior, but a breaking change for Netatmo integrations |
Yes, seems to be the cause of this issue. Already mentioned here: https://forum.netatmo.com/viewtopic.php?p=95627#p95627 |
Copypasted from skrollme/homebridge-eveatmo#77 (comment) Info from Netatmo DEV Support: We just did a modification on the token retrieval process : When you refreshed an access_token using the associated endpoint https://api.netatmo.com/oauth2/token, Netatmo servers responded with a couple of tokens : an access_token and a refresh_token. If the previous access_token was still valid, the refresh_token value was never renewed Starting from the 04/12/2023, this behavior changed to be compliant with the recommendations of the RFC of the OAuth2 Authorization Framework (section 10.4) and improving the security of the data of our users So, if you do not update and use the new refresh_token value when refreshing your access_token, your users will be disconnected after 3 hours and you will retrieve an “invalid_grant” error |
Does this mean that you have to refresh the tokens every 3 hours? |
Related to #25 |
I´ll try to get a confirmation from Netatmo. |
every reading cycle |
Additional info from Netatmo:
|
Here is an alternative Flow with OAuth2 and refreshing the refresh token every 60 minutes. It works |
@ThomasWilla Cool, thanks so much! :) |
Hello Johannes,
I get the value for rain sum 1 and 24 also with the “new” implementation.
Regards, Thomas
|
Hi @ThomasWilla ... It was my issue, sorry! |
Another update from Netatmo.
I requested detailed information when the next change will take place. |
From where you have NetatmoAccessToken? I have only NetatmoClientId and NetatmoClientSecret. |
I am creating the Access and Refresh token with Postman. I described it here: skrollme/homebridge-eveatmo#62 (comment) Or you can use any other OAuth2 client to create it. Check out the Readme / Authentication: https://github.com/guidone/node-red-contrib-netatmo-dashboard#authentication |
I received a mail from Netatmo, they will reactivate the feature in May. |
So they did it, connection stopped working on June 3rd between 11 AM and 12 PM CEST. |
can you try to create a fresh token pair? |
For several month, everything worked fine, now I keep getting the error "Unable to refresh the access token". I already created new access and refresh token with RapidAPI (which worked fine) but even when I paste the new refresh token in the node-configuration, the error persists... Any idea what I am doing wrong? Or did Netatmo change something again? |
This is not enough for this plugin. The plugin cannot handle the OAuth2 change. See: #25 (comment) |
Seems to have worked, I got the token pair from the netatmo site and then I got it up and running again |
It seems it only works for one request, and then the refresh token becomes invalid again. |
Same here: I get a new refresh token from the netatmo app page. After I have entered that fresh refresh token in the netatmo-config-node, it gets the netatmo station's data once, but on every further request, it returns "Unable to refresh the access token". Any plans to fix this? Would be very much appreciated! |
If you read all the comments here, you will find out, that this git is not maintained and not working anymore... A great alternative is mentioned above. |
I followed the directions and it's working fine. Survived a restart of Home Assistant and the NodeRED container. |
Since today I've alway get the following error:
[netatmo-dashboard:b9345e53.83ab5] Unable to refresh the access token
When I generate a new refresh token, enter it in node-red, one request works. From the second call, again the error above.
Something changed by netatmo?
The text was updated successfully, but these errors were encountered: