Comments (12)
II think that one is used for getting health data.
Authorization code still uses old one:
python_withings_api/withings_api/__init__.py
Lines 337 to 340 in 25b58bf
And it is used in
python_withings_api/withings_api/__init__.py
Lines 374 to 378 in 25b58bf
python_withings_api/withings_api/__init__.py
Lines 429 to 437 in 25b58bf
Also request output changed, so this:
python_withings_api/withings_api/__init__.py
Line 385 in 25b58bf
and this
python_withings_api/withings_api/__init__.py
Line 458 in 25b58bf
should probably be
**response["body"],
and
self._update_token(token=token_dict["body"]) ,
I did those changes in my fork https://github.com/nbogojevic/python_withings_api/, going to check tomorrow if that fixes the issue.
from python_withings_api.
It looks like it is already pointing at the new oauth endpoint.
https://github.com/vangorra/python_withings_api/blob/master/withings_api/__init__.py#L60
from python_withings_api.
Oh you're correct. Good catch.
from python_withings_api.
How'd that work out?
from python_withings_api.
Not complete success. Starts correctly, but refresh fails. Now there are two different URLs one for refresh (wsbapi) and the old one for authentication https://account.withings.com. And it seems that the something is changed in payloads. I'd need to debug little bit more to see what is actually going on during oauth2 flow.
from python_withings_api.
If you guys need another tester, I'd be willing to have a go. Unfortunately I haven't had the time to dedicate to adding python to my list of languages so I can't help there.
from python_withings_api.
BTW, the PR below and it's commits were never put in. Vangorra had a bunch of changes to workaround some other bugs and the reauth bug supposedly.
from python_withings_api.
I've created PR #76 with token refresh fix, tested in Home Assistant. I'm running long time test to see if updates are affected.
from python_withings_api.
Can we run this though on our system without having to have it pull the API from pypi or wherever it pulls from?
from python_withings_api.
Might be complicated. I patched the library directly into home assistant.
If you can log in to shell of your Home Assistant container, then you could do following:
cd /usr/local/lib/python3.9/site-packages/withings_api
curl https://raw.githubusercontent.com/nbogojevic/python_withings_api/master/withings_api/__init__.py
And then restart HA.
from python_withings_api.
For info there probably needs to be another fix for Home Assistant component, but for the time being I don't have issue.
from python_withings_api.
Created new pull request as #78 as changes in Withings response are not compatible with default behavior of requests_oauthlib
and oauthlib
and are breaking reauth flows.
from python_withings_api.
Related Issues (20)
- sleep summary data incomplete? HOT 2
- Wrong URL in OAuth token endpoint HOT 1
- How to use from a script? HOT 1
- What Is The Official Withings Python Module To Use That Is Supported? HOT 1
- refresh_cb returning Error code 401 HOT 5
- Code stopped working, Error 503 for sleep data HOT 1
- TypeError: unsupported operand type(s) for -: 'int' and 'method' HOT 1
- Withings API Breaking Change - Oauth2 URL - Due by 2021-09-01 HOT 1
- New Measure Type HOT 1
- Withings integration in HA broke HOT 9
- Question: Distinguish weight by user HOT 4
- <MeasureType.UNKNOWN: -999999> - python3.9/site-packages/withings_api/common.py:38 HOT 1
- Unexpected error fetching subscription_update_coordinator data: Error code 293 HOT 1
- Unexpected error fetching poll_data_update_coordinator data: 'dict' object has no attribute 'context' HOT 1
- measure_get_meas() does not return all data HOT 2
- Token Renewal in 2.4.0 HOT 2
- Invalid State when following redirect URI HOT 1
- Unsupported value HOT 6
- Dependency "requests-oauth" hasn't been used for a long time
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python_withings_api.