-
Notifications
You must be signed in to change notification settings - Fork 11
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
Netatmo has changed token request-code no longer works #167
Comments
My current workaround is instead of using Of course this is no full automation and would need to be fixed here. But at least my scripts now work again... |
My hope was now to initially generate Access Token and Refresh Token, modify the coding here to be able to pass the Refresh Token in methods like No idea if I do something wrong or if there are additional changes that are not documented yet on Netatmo side. |
Did you look at the link I think this has to be done before you can even request a token. |
I have a valid Access and Refresh token (I was also able to get data with that token). It was generated on the My Apps Page |
I used your temporary fix with the tokens from My Apps Page. Works for now. Thanks for your help. |
You're welcome. But this token needs to be renewed at some point in time (I think it was working for ~3 hours on my side). And this token refreshment was not yet working for me for some reason... |
I have created a PR #168 with a quick fix for this issue |
I think I need a rewrite of this library for better handler Netatmo API's and use new C# features... |
Extend CredentialManager to accept refresh_token and add warning message for deprecated GenerateToken Example usage: ```csharp var clientId = "myClientId"; var clientSecret = "myClientSecret"; var accessToken = "myAccessToken"; var refreshToken = "myRefreshToken"; var client = new Client( SystemClock.Instance, "https://api.netatmo.com/", clientId, clientSecret); client.ProvideOAuth2Token(accessToken, refreshToken); await client.RefreshToken(); var stationsData = await client.Weather.GetStationsData(); ``` Refs: #167 #168
1.5.3 published on Nuget |
This code has been working great until 7/13/2023 when it appears Netatmo has changed the way to request a token.
It looks like they switched to Oauth2 (see https://dev.netatmo.com/apidocumentation/oauth).
Authorization is needed before a token can be requested.
The text was updated successfully, but these errors were encountered: