-
Notifications
You must be signed in to change notification settings - Fork 30
Description
I have been using this python script for a while, but now (as of 12/10/2025), it's no longer working. My token expired and it won't renew.
I tried obtaining a new one using the "carelink_carepartner_api_login.py", but it opens the window in FireFox, I login, and it goes to a blank white page after successful login, but it never captures the info it needs...
Now with that, I'm not sure if this is something on my end or if this just no longer works...
I would like to know if there is a way for me to manually update my logindata.json maybe?
If I capture the curl command in developer tools it shows this: (Note I blocked out what I thought my be private info):
$session = New-Object Microsoft.PowerShell.Commands.WebRequestSession
$session.Cookies.Add((New-Object System.Net.Cookie("countryCode", "", "/", "mdtlogin.medtronic.com")))
$session.Cookies.Add((New-Object System.Net.Cookie("ssoCookie", "[private info 1]|[private info 2]|[private info 3]", "/", "mdtlogin.medtronic.com")))
$session.Cookies.Add((New-Object System.Net.Cookie("sessionCookie", "[private info 4]|[private info 5]|[private info 6]", "/", "mdtlogin.medtronic.com")))
Invoke-WebRequest -UseBasicParsing -Uri "https://mdtlogin.medtronic.com/mmcl/auth/oauth/v2/authorize/consent" `
-Method "POST" `
-WebSession $session `
-UserAgent "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:146.0) Gecko/20100101 Firefox/146.0" `
-Headers @{
"Accept" = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
"Accept-Language" = "en-US,en;q=0.5"
"Accept-Encoding" = "gzip, deflate, br, zstd"
"Origin" = "https://mdtlogin.medtronic.com"
"Referer" = "https://mdtlogin.medtronic.com/mmcl/auth/oauth/v2/authorize/login?action=login&provider=enterprise&code=[private info 7]&state=[private info 8]"
"Upgrade-Insecure-Requests" = "1"
"Sec-Fetch-Dest" = "document"
"Sec-Fetch-Mode" = "navigate"
"Sec-Fetch-Site" = "same-origin"
"Priority" = "u=0, i"
} `
-ContentType "application/x-www-form-urlencoded" `
-Body "action=consent&sessionID=[private info 9]&
sessionData=[private info 10]&response_type=code&response_mode=query"I numbered all my private info's in hopes you can provide what number goes where in the logindata.json file...
{
"access_token": "[private info 10]",
"refresh_token": "[private info ??]",
"scope": "profile openid roles country msso msso_register msso_client_register",
"resource": [
"https://mdtsts.medtronic.com/*"
],
"client_id": "[private info ??]",
"client_secret": "[private info ??]",
"mag-identifier": "[private info ??]"
}I'm confident only in #10 as noted above.