-
Notifications
You must be signed in to change notification settings - Fork 5
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
urllib.error.HTTPError: HTTP Error 400: after Netatmo Authentication update #4
Comments
Thank you for informing me of the issues with broken oauth. Unfortunately I will not have time to fix it any time soon. If anyone wants to fix it, I will be happy to receive a pull request. |
Please add an info to the top of the readme that this container is useless till someone reworked the authentication and maybe link to this Issue. |
Hi mbaiti. I will do that when I come back to my PC. In the meanwhile I would appreciate it if you start looking at a solution and register a pull request with the fix. |
Hi @turbosnute, |
@mbaiti yeah. I'm thinking about writing the whole thing again from the bottom not relying on 3rd party stuff, but I unfortunately have to little time available at the moment |
@turbosnute sounds great, i would appreciate a rewrite! |
@mbaiti My rewrite is now public. It should work if you configure it correctly. github.com/turbosnute/ps-netatmo-influxdb |
@turbosnute that's fast! Thank you! In the meantime I found another solution to write the Netatmo data to an InfluxDB. And to be honest, I liked your previous approach with python and the config via environment variables much more than Powershell and an extra web server with php for the config. |
Hi, after the Netatmo authentication update I'm unable to get a successfull connection to Netatmo. I'll get "urllib.error.HTTPError: HTTP Error 400:"
Authentication update
Dear Netatmo developer,
As of today, when you refresh an Access Token using the associated endpoint https://api.netatmo.com/oauth2/token, Netatmo servers respond with a couple of tokens : an Access Token and a Refresh Token.If the previous Access Token is still valid, the newly returned access token is identical but its expiration time is extended for 3 hours.In any case, the refresh token is not renewed.
Starting from the 17/04/2023, this behavior will change to 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.When refreshing tokens, Access Token and Refresh Token will be automatically renewed and former tokens invalidated.
What does it means for me ? If you were already updating the tokens provided when refreshing your tokens, this change will not impact you.If you do not update the refresh token when refreshing your Access Token, your users will be disconnected after 3 hours as the former tokens will become invalidated.To fix it, you need to update the tokens as soon as you get the newly generated ones.
Sincerely,Legrand - Netatmo - Bticino
The text was updated successfully, but these errors were encountered: