ondrej1024 / carelink-python-client Goto Github PK
View Code? Open in Web Editor NEWExperimental Medtronic CareLink Client in Python
License: GNU Affero General Public License v3.0
Experimental Medtronic CareLink Client in Python
License: GNU Affero General Public License v3.0
Hello, probably this issue is not directly related to your software, but I wanted to ask anyway. In my Carelink account MFA is enabled, and there is no way to turn it off. The configuration screen says MFA is enabled, and also required for my account. It is a European (Norwegian) Carelink account, with login using carelink.minimed.eu.
Hello. I am trying to use carelink_carepartner_api_login.py. It doesn't seem to work for the US. It defaults to EU as the county and because it goes straight to the login URL, you can't change the county.
Any suggestions? After Firefox launched, I tried manually going to the correct URL for US, but it after I login, it doesn't do anything... The python script that is..
Running carelink_client2_cli.py (or the proxy) gives the following error:
:INFO]_get_data()
Expecting value: line 1 column 1 (char 0)
HI,
in the step where I should enter username and password firefox does not open and this appears:
$python3 carelink_carepartner_api_login.py
performing login...
captcha url: https://mdtlogin-ocl.medtronic.com:443/mmcl/enterprise/login?sessionID=d60d051f-410d-47e6-8af8-db4465251fa0
opening Firefox instance...
Warning: you may need to close Firefox if it's already running or nothing happens!
Traceback (most recent call last):
File "/home/meteog/carelink-python-client/carelink_carepartner_api_login.py", line 277, in
main()
File "/home/meteog/carelink-python-client/carelink_carepartner_api_login.py", line 273, in main
token_data = do_login(endpoint_config)
File "/home/meteog/carelink-python-client/carelink_carepartner_api_login.py", line 182, in do_login
captcha_code, captcha_sso_state = do_captcha(captcha_url, sso_config["oauth"]["client"]["client_ids"][0]['redirect_uri'])
File "/home/meteog/carelink-python-client/carelink_carepartner_api_login.py", line 106, in do_captcha
driver = webdriver.Firefox()
File "/usr/local/lib/python3.10/dist-packages/seleniumwire/webdriver.py", line 179, in init
super().init(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/selenium/webdriver/firefox/webdriver.py", line 69, in init
super().init(command_executor=executor, options=options)
File "/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webdriver.py", line 208, in init
self.start_session(capabilities)
File "/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webdriver.py", line 292, in start_session
response = self.execute(Command.NEW_SESSION, caps)["value"]
File "/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webdriver.py", line 347, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/errorhandler.py", line 229, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.InvalidArgumentException: Message: binary is not a Firefox executable
has this happened to you before?
Distributor ID: Ubuntu
Description: Ubuntu 22.04.4 LTS
Release: 22.04
Codename: jammy
Thanks
Gianni
Hello Ondrej,
I am using the proxy to feed some M5stack devices. It's working great!!!!
I also see that you client was used as a source for the Home Assistant plugin: Great.
But there's 1 functionality that I miss: if the proxy (or the server it's running on) is rebooted (I perform patch management :) ), the token has to be (manually) fetched again.
It would be GREAT if this token could be saved to disk, so that it could be re-used at startup (unless the server was down for a longer period off course).
Is this (easily) possible. Did you think about this option?
I'm noticing that Medtronic is occasionally returning bolus datetimes of 2000-12-31T05:00:00
in the data feed. Does anyone know why this is happening or have a strategy for dealing with it? (And yes, my pump's date and time are set correctly)
One thing I've noticed is that the problem seems to go away when I stop the proxy, get a new cookies.json
file, and restart it. This just happened to me - all day Thursday I had bad datetimes, then I stopped the proxy, went to firefox and got a new cookies file, then restarted it, and immediately all the datetimes were correct.
I've also seen the problem just "fix itself" if I wait long enough, but that doesn't always work.
What's also odd is that the Carelink iOS client I have installed is presumably using the same data feed but all the glucose records are plotted correctly on the graph. This makes me think it's something in the way we're fetching the data, but that's just a guess.
Any help/advice would be greatly appreciated.
So how do you get the access token?
Do you just login from your browser and inspect the network calls to see the authorization header?
Thanks
Hello ondrej1024,
I want to get a json file from my Carelink account. I can't do that on account in selected Canada country. Do you know how can I fix it?
When I try to run carelink_carepartner_api_login.py
, I get this exception:
selenium.common.exceptions.WebDriverException: Message: Service geckodriver unexpectedly exited. Status code was: 1
I set the debug flag and this was the output:
$ python carelink_carepartner_api_login.py
performing login...
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): clcloud.minimed.eu:443
send: b'GET /connect/carepartner/v6/discover/android/3.1 HTTP/1.1\r\nHost: clcloud.minimed.eu\r\nUser-Agent: python-requests/2.26.0\r\nAccept-Encoding: gzip, deflate, br\r\nAccept: */*\r\nConnection: keep-alive\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Date: Fri, 19 Jan 2024 17:38:01 GMT
header: Content-Type: application/json;charset=utf-8
header: Content-Length: 15100
header: Connection: keep-alive
header: x-amzn-RequestId: 6026b565-1e71-44f4-b2ad-859ce02a90a6
header: X-Permitted-Cross-Domain-Policies: none
header: Strict-Transport-Security: max-age=31536000 ; includeSubDomains
header: X-Frame-Options: sameorigin
header: Content-Security-Policy: default-src 'self'
header: X-CUM-SIGNATURE: Vx3q7Lg2JOLnl34MxJEahH5fGQdT82AvneWYy4BmQnpvDfEevFOmYZrisClueO5Yods02oPnMOHpi0ASthUMZCRVmr5kM2HGOWcBor2pb3ODHPIcggbCGlVAHMnUXmhzD180A3V3fJk30nbphvJrVxsZg8HAz9QLmp5RCOjAOYMBLrXcuKN4bB3uPVYw4w1kBMdy7IeNqsE4BJRgBJeQzXoNvDWFMMRW/wvwi+OtAgMVFQ+xbjEhcySl6dLSfKSf0CrKP4zBPL3RXgjw+F8BeBtCSiT8Rf5/912kBaTITACHc546mju1S8hCqptCYy0ddQe2N3qxB93Btb1JMAHH6w==
header: x-amz-apigw-id: RzD7FH5dFiAEb0Q=
header: Cache-Control: no-cache, no-store
header: X-Amzn-Trace-Id: Root=1-65aab379-4a6f6baf77b4ea1833996693;Sampled=0;lineage=593762a0:0
DEBUG:urllib3.connectionpool:https://clcloud.minimed.eu:443 "GET /connect/carepartner/v6/discover/android/3.1 HTTP/1.1" 200 15100
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): carelink.minimed.eu:443
send: b'GET /configs/v1/eu_sso_cp_eu_v5.json HTTP/1.1\r\nHost: carelink.minimed.eu\r\nUser-Agent: python-requests/2.26.0\r\nAccept-Encoding: gzip, deflate, br\r\nAccept: */*\r\nConnection: keep-alive\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: X-Frame-Options: SAMEORIGIN
header: X-Content-Type-Options: nosniff
header: X-XSS-Protection: 1; mode=block
header: Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
header: Vary: Origin
header: Last-Modified: Thu, 09 Nov 2023 15:21:51 GMT
header: ETag: "23db-609b9c35521c0"
header: Accept-Ranges: bytes
header: Content-Type: application/json
header: Vary: Accept-Encoding
header: Content-Encoding: gzip
header: Cache-Control: no-cache
header: Date: Fri, 19 Jan 2024 17:38:02 GMT
header: Content-Length: 4633
header: Connection: keep-alive
header: Akamai-Cache-Status: Miss from child
DEBUG:urllib3.connectionpool:https://carelink.minimed.eu:443 "GET /configs/v1/eu_sso_cp_eu_v5.json HTTP/1.1" 200 4633
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): mdtlogin-ocl.medtronic.com:443
send: b'POST /mmcl/connect/client/initialize HTTP/1.1\r\nHost: mdtlogin-ocl.medtronic.com\r\nUser-Agent: python-requests/2.26.0\r\nAccept-Encoding: gzip, deflate, br\r\nAccept: */*\r\nConnection: keep-alive\r\ndevice-id: NTRkZjdmNDc0YzdjZThmYTVmYjhmZDVhNjk4OWJjMjQzYzc4OWExMzliZTMwZTkwNzNhMGM5MjFkMTI0ZGI2Mg==\r\nContent-Length: 89\r\nContent-Type: application/x-www-form-urlencoded\r\n\r\n'
send: b'client_id=c19218f2-7157-4c93-8fbe-49636e7f9c74&nonce=90a27efb-14c1-7cd3-b0f4-ed8c68e7a3c4'
reply: 'HTTP/1.1 200 OK\r\n'
header: Pragma: no-cache
header: Cache-Control: no-store
header: Content-Encoding: gzip
header: Content-Type: application/json;charset=UTF-8
header: Content-Length: 124
header: Date: Fri, 19 Jan 2024 17:38:05 GMT
header: Server: Layer7-API-Gateway
DEBUG:urllib3.connectionpool:https://mdtlogin-ocl.medtronic.com:443 "POST /mmcl/connect/client/initialize HTTP/1.1" 200 124
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): mdtlogin-ocl.medtronic.com:443
send: b'GET /mmcl/auth/oauth/v2/authorize?client_id=5885137f-8722-4fed-98f9-2f70fb8662cf&response_type=code&display=social_login&scope=profile+openid+roles+country+msso+msso_register+msso_client_register&redirect_uri=com.medtronic.carepartner%3A%2Fsso&code_challenge=rrJFhbnFvXIp-izhA6iBh9qqDQWkWvnkdOaafMnPZ8w&code_challenge_method=S256&state=TTFMMFhFUDdyMlYwMWp1Yk HTTP/1.1\r\nHost: mdtlogin-ocl.medtronic.com\r\nUser-Agent: python-requests/2.26.0\r\nAccept-Encoding: gzip, deflate, br\r\nAccept: */*\r\nConnection: keep-alive\r\n\r\n'
reply: 'HTTP/1.1 302 Found\r\n'
header: Content-Security-Policy: frame-src https://*.medtronic.com https://*.minimed.eu https://*.minimed.eu:5132 https://*.minimed.com https://*.com.cn https://*.google.com https://*.gstatic.com; default-src https://*.medtronic.com https://*.minimed.eu https://*.minimed.eu:5132 https://*.minimed.com https://*.com.cn https://*.google.com https://*.gstatic.com; connect-src https://*.medtronic.com https://*.minimed.eu https://*.minimed.eu:5132 https://*.minimed.com https://*.com.cn https://*.google.com https://*.gstatic.com; script-src https://*.medtronic.com https://*.minimed.eu https://*.minimed.eu:5132 https://*.minimed.com https://*.com.cn https://*.google.com https://*.gstatic.com 'unsafe-inline'; img-src * data:; style-src https://*.medtronic.com https://*.minimed.eu https://*.minimed.eu:5132 https://*.minimed.com https://fonts.googleapis.com https://*.com.cn https://*.google.com https://*.gstatic.com 'unsafe-inline'; font-src * data:;
header: X-Content-Type-Options: nosniff
header: X-XSS-Protection: 1
header: Location: https://mdtlogin-ocl.medtronic.com/mmcl/auth/oauth/v2/authorize/login?action=display&sessionID=80f1fca8-a227-43e0-ba2b-679367a649cb&sessionData=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.ew0KICAgICJzZXNzaW9uIjogew0KICAgICAgICAic2Vzc2lvbklEIjoiODBmMWZjYTgtYTIyNy00M2UwLWJhMmItNjc5MzY3YTY0OWNiIiwNCiAgICAgICAgImV4cCI6MTcwNTY4OTQ4MywNCiAgICAgICAgImN1cnJlbnRfdXNlcm5hbWUiOiIiLA0KICAgICAgICAiY3VycmVudF91c2VyX2NvbnNlbnQiOiJub25lIiwNCiAgICAgICAgImN1cnJlbnRfdXNlcl9yb2xlIjoiIiwNCiAgICAgICAgImN1cnJlbnRfdXNlcl9hY3IiOiIwIiwNCiAgICAgICAgImN1cnJlbnRfdXNlcl9hdXRoVGltZSI6IjAiLA0KICAgICAgICAiY3VycmVudF91c2VyX2F0dHJpYnV0ZXMiOiIiLA0KICAgICAgICAic2FsdCI6IiIsDQogICAgICAgICJ0aGlyZF9wYXJ0eV9zc29fdG9rZW4iOiIiLA0KICAgICAgICAidGhpcmRfcGFydHlfc3NvX3Rva2VuX3R5cGUiOiIiDQogICAgfSwNCiAgICAicmVxdWVzdF9jb25zZW50Ijogew0KICAgICAgICAiY2xpZW50X25hbWUiOiJPQ0wrLStDYXJlK1BhcnRuZXIrQXBwKy0rT1VTIiwNCiAgICAgICAgInNjb3BlX3ZlcmlmaWVkIjoicHJvZmlsZStvcGVuaWQrcm9sZXMrY291bnRyeSttc3NvK21zc29fcmVnaXN0ZXIrbXNzb19jbGllbnRfcmVnaXN0ZXIiDQogICAgfSwNCiAgICAicmVxdWVzdF9wYXJhbWV0ZXJzIjogew0KICAgICAgICAiZGlzcGxheSI6InNvY2lhbF9sb2dpbiIsDQogICAgICAgICJwcm9tcHQiOiJsb2dpbitjb25zZW50IiwNCiAgICAgICAgImlkX3Rva2VuX2hpbnQiOiIiLA0KICAgICAgICAibG9naW5faGludCI6IiIsDQogICAgICAgICJhY3JfdmFsdWVzIjoiIiwNCiAgICAgICAgImNsaWVudF9pZCI6IjU4ODUxMzdmLTg3MjItNGZlZC05OGY5LTJmNzBmYjg2NjJjZiIsDQogICAgICAgICJub25jZSI6IiIsDQogICAgICAgICJzY29wZSI6InByb2ZpbGUrb3BlbmlkK3JvbGVzK2NvdW50cnkrbXNzbyttc3NvX3JlZ2lzdGVyK21zc29fY2xpZW50X3JlZ2lzdGVyIiwNCiAgICAgICAgIm1heF9hZ2UiOiAiIg0KICAgIH0NCn0.qSlsVC1eyAr6I68rt4_qOBwq_p9_VJcg4y81SKuKp_w&locale=&countrycode=
header: Content-Encoding: gzip
header: Content-Type: text/plain;charset=UTF-8
header: Content-Length: 20
header: Date: Fri, 19 Jan 2024 17:38:03 GMT
header: Server: Layer7-API-Gateway
DEBUG:urllib3.connectionpool:https://mdtlogin-ocl.medtronic.com:443 "GET /mmcl/auth/oauth/v2/authorize?client_id=5885137f-8722-4fed-98f9-2f70fb8662cf&response_type=code&display=social_login&scope=profile+openid+roles+country+msso+msso_register+msso_client_register&redirect_uri=com.medtronic.carepartner%3A%2Fsso&code_challenge=rrJFhbnFvXIp-izhA6iBh9qqDQWkWvnkdOaafMnPZ8w&code_challenge_method=S256&state=TTFMMFhFUDdyMlYwMWp1Yk HTTP/1.1" 302 20
send: b'GET /mmcl/auth/oauth/v2/authorize/login?action=display&sessionID=80f1fca8-a227-43e0-ba2b-679367a649cb&sessionData=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.ew0KICAgICJzZXNzaW9uIjogew0KICAgICAgICAic2Vzc2lvbklEIjoiODBmMWZjYTgtYTIyNy00M2UwLWJhMmItNjc5MzY3YTY0OWNiIiwNCiAgICAgICAgImV4cCI6MTcwNTY4OTQ4MywNCiAgICAgICAgImN1cnJlbnRfdXNlcm5hbWUiOiIiLA0KICAgICAgICAiY3VycmVudF91c2VyX2NvbnNlbnQiOiJub25lIiwNCiAgICAgICAgImN1cnJlbnRfdXNlcl9yb2xlIjoiIiwNCiAgICAgICAgImN1cnJlbnRfdXNlcl9hY3IiOiIwIiwNCiAgICAgICAgImN1cnJlbnRfdXNlcl9hdXRoVGltZSI6IjAiLA0KICAgICAgICAiY3VycmVudF91c2VyX2F0dHJpYnV0ZXMiOiIiLA0KICAgICAgICAic2FsdCI6IiIsDQogICAgICAgICJ0aGlyZF9wYXJ0eV9zc29fdG9rZW4iOiIiLA0KICAgICAgICAidGhpcmRfcGFydHlfc3NvX3Rva2VuX3R5cGUiOiIiDQogICAgfSwNCiAgICAicmVxdWVzdF9jb25zZW50Ijogew0KICAgICAgICAiY2xpZW50X25hbWUiOiJPQ0wrLStDYXJlK1BhcnRuZXIrQXBwKy0rT1VTIiwNCiAgICAgICAgInNjb3BlX3ZlcmlmaWVkIjoicHJvZmlsZStvcGVuaWQrcm9sZXMrY291bnRyeSttc3NvK21zc29fcmVnaXN0ZXIrbXNzb19jbGllbnRfcmVnaXN0ZXIiDQogICAgfSwNCiAgICAicmVxdWVzdF9wYXJhbWV0ZXJzIjogew0KICAgICAgICAiZGlzcGxheSI6InNvY2lhbF9sb2dpbiIsDQogICAgICAgICJwcm9tcHQiOiJsb2dpbitjb25zZW50IiwNCiAgICAgICAgImlkX3Rva2VuX2hpbnQiOiIiLA0KICAgICAgICAibG9naW5faGludCI6IiIsDQogICAgICAgICJhY3JfdmFsdWVzIjoiIiwNCiAgICAgICAgImNsaWVudF9pZCI6IjU4ODUxMzdmLTg3MjItNGZlZC05OGY5LTJmNzBmYjg2NjJjZiIsDQogICAgICAgICJub25jZSI6IiIsDQogICAgICAgICJzY29wZSI6InByb2ZpbGUrb3BlbmlkK3JvbGVzK2NvdW50cnkrbXNzbyttc3NvX3JlZ2lzdGVyK21zc29fY2xpZW50X3JlZ2lzdGVyIiwNCiAgICAgICAgIm1heF9hZ2UiOiAiIg0KICAgIH0NCn0.qSlsVC1eyAr6I68rt4_qOBwq_p9_VJcg4y81SKuKp_w&locale=&countrycode= HTTP/1.1\r\nHost: mdtlogin-ocl.medtronic.com\r\nUser-Agent: python-requests/2.26.0\r\nAccept-Encoding: gzip, deflate, br\r\nAccept: */*\r\nConnection: keep-alive\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Content-Security-Policy: frame-src https://*.medtronic.com https://*.minimed.eu https://*.minimed.eu:5132 https://*.minimed.com https://*.com.cn https://*.google.com https://*.gstatic.com; default-src https://*.medtronic.com https://*.minimed.eu https://*.minimed.eu:5132 https://*.minimed.com https://*.com.cn https://*.google.com https://*.gstatic.com; connect-src https://*.medtronic.com https://*.minimed.eu https://*.minimed.eu:5132 https://*.minimed.com https://*.com.cn https://*.google.com https://*.gstatic.com; script-src https://*.medtronic.com https://*.minimed.eu https://*.minimed.eu:5132 https://*.minimed.com https://*.com.cn https://*.google.com https://*.gstatic.com 'unsafe-inline'; img-src * data:; style-src https://*.medtronic.com https://*.minimed.eu https://*.minimed.eu:5132 https://*.minimed.com https://fonts.googleapis.com https://*.com.cn https://*.google.com https://*.gstatic.com 'unsafe-inline'; font-src * data:;
header: X-Content-Type-Options: nosniff
header: X-XSS-Protection: 1
header: Content-Encoding: gzip
header: Content-Type: application/json;charset=UTF-8
header: Content-Length: 276
header: Date: Fri, 19 Jan 2024 17:38:03 GMT
header: Server: Layer7-API-Gateway
DEBUG:urllib3.connectionpool:https://mdtlogin-ocl.medtronic.com:443 "GET /mmcl/auth/oauth/v2/authorize/login?action=display&sessionID=80f1fca8-a227-43e0-ba2b-679367a649cb&sessionData=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.ew0KICAgICJzZXNzaW9uIjogew0KICAgICAgICAic2Vzc2lvbklEIjoiODBmMWZjYTgtYTIyNy00M2UwLWJhMmItNjc5MzY3YTY0OWNiIiwNCiAgICAgICAgImV4cCI6MTcwNTY4OTQ4MywNCiAgICAgICAgImN1cnJlbnRfdXNlcm5hbWUiOiIiLA0KICAgICAgICAiY3VycmVudF91c2VyX2NvbnNlbnQiOiJub25lIiwNCiAgICAgICAgImN1cnJlbnRfdXNlcl9yb2xlIjoiIiwNCiAgICAgICAgImN1cnJlbnRfdXNlcl9hY3IiOiIwIiwNCiAgICAgICAgImN1cnJlbnRfdXNlcl9hdXRoVGltZSI6IjAiLA0KICAgICAgICAiY3VycmVudF91c2VyX2F0dHJpYnV0ZXMiOiIiLA0KICAgICAgICAic2FsdCI6IiIsDQogICAgICAgICJ0aGlyZF9wYXJ0eV9zc29fdG9rZW4iOiIiLA0KICAgICAgICAidGhpcmRfcGFydHlfc3NvX3Rva2VuX3R5cGUiOiIiDQogICAgfSwNCiAgICAicmVxdWVzdF9jb25zZW50Ijogew0KICAgICAgICAiY2xpZW50X25hbWUiOiJPQ0wrLStDYXJlK1BhcnRuZXIrQXBwKy0rT1VTIiwNCiAgICAgICAgInNjb3BlX3ZlcmlmaWVkIjoicHJvZmlsZStvcGVuaWQrcm9sZXMrY291bnRyeSttc3NvK21zc29fcmVnaXN0ZXIrbXNzb19jbGllbnRfcmVnaXN0ZXIiDQogICAgfSwNCiAgICAicmVxdWVzdF9wYXJhbWV0ZXJzIjogew0KICAgICAgICAiZGlzcGxheSI6InNvY2lhbF9sb2dpbiIsDQogICAgICAgICJwcm9tcHQiOiJsb2dpbitjb25zZW50IiwNCiAgICAgICAgImlkX3Rva2VuX2hpbnQiOiIiLA0KICAgICAgICAibG9naW5faGludCI6IiIsDQogICAgICAgICJhY3JfdmFsdWVzIjoiIiwNCiAgICAgICAgImNsaWVudF9pZCI6IjU4ODUxMzdmLTg3MjItNGZlZC05OGY5LTJmNzBmYjg2NjJjZiIsDQogICAgICAgICJub25jZSI6IiIsDQogICAgICAgICJzY29wZSI6InByb2ZpbGUrb3BlbmlkK3JvbGVzK2NvdW50cnkrbXNzbyttc3NvX3JlZ2lzdGVyK21zc29fY2xpZW50X3JlZ2lzdGVyIiwNCiAgICAgICAgIm1heF9hZ2UiOiAiIg0KICAgIH0NCn0.qSlsVC1eyAr6I68rt4_qOBwq_p9_VJcg4y81SKuKp_w&locale=&countrycode= HTTP/1.1" 200 276
captcha url: https://mdtlogin-ocl.medtronic.com:443/mmcl/enterprise/login?sessionID=80f1fca8-a227-43e0-ba2b-679367a649cb
INFO:seleniumwire.storage:Using default request storage
INFO:seleniumwire.backend:Created proxy listening on ::ffff:127.0.0.1:64301
Traceback (most recent call last):
File "/Users/snewman/Desktop/carelink-python-client/carelink_carepartner_api_login.py", line 275, in <module>
main()
File "/Users/snewman/Desktop/carelink-python-client/carelink_carepartner_api_login.py", line 271, in main
token_data = do_login(endpoint_config)
File "/Users/snewman/Desktop/carelink-python-client/carelink_carepartner_api_login.py", line 180, in do_login
captcha_code, captcha_sso_state = do_captcha(captcha_url, sso_config["oauth"]["client"]["client_ids"][0]['redirect_uri'])
File "/Users/snewman/Desktop/carelink-python-client/carelink_carepartner_api_login.py", line 104, in do_captcha
driver = webdriver.Firefox()
File "/Users/snewman/.Envs/sandbox3/lib/python3.9/site-packages/seleniumwire/webdriver.py", line 179, in __init__
super().__init__(*args, **kwargs)
File "/Users/snewman/.Envs/sandbox3/lib/python3.9/site-packages/selenium/webdriver/firefox/webdriver.py", line 174, in __init__
self.service.start()
File "/Users/snewman/.Envs/sandbox3/lib/python3.9/site-packages/selenium/webdriver/common/service.py", line 98, in start
self.assert_process_still_running()
File "/Users/snewman/.Envs/sandbox3/lib/python3.9/site-packages/selenium/webdriver/common/service.py", line 110, in assert_process_still_running
raise WebDriverException(
selenium.common.exceptions.WebDriverException: Message: Service geckodriver unexpectedly exited. Status code was: 1
How can build this proxy device ?
https://github.com/ondrej1024/carelink-python-client/blob/main/carelink_client_proxy.py
I have M5Stack and would like start use your code.
Can i start your code with proxy on some public service ? Maybe on herokuapp.com or other service ? and connect from M5Stack to this PROXY ?
I'm unable to login after Medtronic added a Recaptcha to their login screen. Please help. Thanks
Hi, thanks for the great work,
I have an issue using main branche:
When I do a request using the _cli script it works perfectly.
But when I import the client and make a request via client.login() using the same parameters in carelink_client.CareLinkClient()
it gives a 400
Hope you could help thx...
Hello ondrej,
I'm using this implementation since a few months now and it worked perfectly until this morning.
I can not manage to recover data from the API anymore and it gives me a 400 "Forbidden" error message.
After some research, it looks like the connection process is fine and that the error comes from this route: "https://clcloud.minimed.eu/connect/carepartner/v6/display/message"
Right now, we make a POST request to this route providing the auth token and a url-encoded form containing the username and the role but it seems like they have changed something with their API and that it needs something new.
So i was wondering if someone out there has the same problem and how can we find a solution for this ?
Will the reuse of auth_cookie be more efficient than repeated logins? Looks like the cookie has an hour lifetime and getting refreshed on use.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.