vangorra / python_withings_api

Library for the Withings Health API
MIT License
101 stars 34 forks source link

Token Renewal in 2.4.0 #83

Open psilo909 opened 2 years ago

psilo909 commented 2 years ago

I just upgrade my smarthome plugin (https://github.com/smarthomeNG/plugins/tree/develop/withings_health) which is using withings-api to newest version. No i can get a new token (invalid before), but the renewal seems to be broken. It is working fine until the timeframe is reached, then i am getting error logs in my log.

did i miss anything or should this be working as before withings changed auth?

psilo909 commented 2 years ago

now added a manual call to self._client.refresh_token() and its updating/refreshing.

however the registred callback function in WithingsApi for updating the token seems not to get triggered without calling that method explicitely

soaxelbrooke commented 2 years ago

I'm seeing the token refreshed, and saved, but Withings is responding with a 401 to that refreshed token. Is something broken on their side?