Description
All I want to do is pull my own weight data from the Withings API. I finally figured out how to generate a "nokia.cfg" file based on the docs for the library. It is populated with:
access_token
token_expiry
token_type
refresh_token
user_id
client_id
consumer_secret
To use the API I hard coded these values into "NokiaCredentials" and it worked PERFECT for a few hours. Then I got an error "oauthlib.oauth2.rfc6749.errors.TokenExpiredError: (token_expired)"
I know from the Withings API docs I am supposed to somehow update the both the Access Token and the Refresh Token, but I have no idea how to do that. I read in the Python Withings code to use "refresh_cb". If that is how I get the updated tokens, can someone please post a simple example how to get the updated tokens?
I love that this Python Library exists because the Withings API is quite difficult to authenticate against just to pull my own weight data.
Thanks for ANY and all help! I will gladly donate to anyone that will help me... Thanks again!