nokia-weight-sync
nokia-weight-sync copied to clipboard
Withings Registration not working
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?
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,
)