Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Need Help With Use Of Library - How To Refresh Key #30

Copy link
Copy link
@jeangv

Description

@jeangv
Issue body actions

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.