Skip to content
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

Withings Registration not working #19

Open
dsonenberg opened this issue Oct 14, 2019 · 1 comment
Open

Withings Registration not working #19

dsonenberg opened this issue Oct 14, 2019 · 1 comment

Comments

@dsonenberg
Copy link

Hey,

I just tried setting up an application with Withings but it doesn't seem to be working. They changed their requirements on call back, and localhost is no longer working. I tried using an ddns URL i have but that gives an "Internal error" message. Do you know any tricks to getting this working?

@ossgeek314
Copy link

ossgeek314 commented Dec 27, 2019

In the nokia.py file. I added include_client_id=True, to line 85. This allows the function to work (nokia requires the client_id be sent now).

This is what the function call looks like now:

def get_credentials(self, code):
        tokens = self._oauth().fetch_token(
            '%s/oauth2/token' % self.URL,
            include_client_id=True,
            code=code,
            timeout=2,
            client_secret=self.consumer_secret)
        return NokiaCredentials(
            access_token=tokens['access_token'],
            token_expiry=str(ts()+int(tokens['expires_in'])),
            token_type=tokens['token_type'],
            refresh_token=tokens['refresh_token'],
            user_id=tokens['userid'],
            client_id=self.client_id,
            consumer_secret=self.consumer_secret,
        )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants