Updated JWT token

And added Documentation over how to get new JWT token.
This commit is contained in:
Bart Koolen 2025-08-01 10:32:19 +02:00
parent 0ab321cea0
commit b3c92b4bae
3 changed files with 38 additions and 7 deletions

36
src/Glucose_http_jwt.py Normal file
View file

@ -0,0 +1,36 @@
import requests
# API endpoint for login
url = "https://api-eu.libreview.io/llu/auth/login" # Replace with the actual API URL
# Login credentials
payload = {
"email": "gjkoolen@gmail.com",
"password": "VropZup#3x"
}
# Headers
headers = {
'accept-encoding': 'gzip',
'cache-control': 'no-cache',
'connection': 'Keep-Alive',
'content-type': 'application/json',
'product': 'llu.android',
'version': '4.7'
}
# Send the POST request
response = requests.post(url, json=payload, headers=headers)
if response.status_code == 200:
data = response.json()
# Ensure the response contains the expected structure
if data.get("status") == 0 and "authTicket" in data.get("data", {}):
jwt_token = data["data"]["authTicket"]["token"]
print("Login successful! JWT Token:", jwt_token)
else:
print("Status = ", data.get("status"))
print("Login failed: Unexpected response format")
else:
print("Login failed:", response.status_code, response.text)