-
-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auto-detect Region #421
Comments
Actually, they disabled their region-based restrictions a few days ago. So, in this file, you should use your 'BASE_URL' instead of 'getBaseUrl', that function is useless now. But the reason why your app is crashing isn't this: it crashes when it reaches the "connections" API. you need to grab this value during login:
encode it with sha256 and pass it as a header when calling 'https://api.libreview.io/llu/connections' Example: |
Just to let you know that for germany, the region is still active, so you need to add a fallback. if the login (using this is how my fallback code looks like (using C#):
|
Thanks for the information. 👍 |
Hi, and massive thanks for what seems to be a great project! I'm in South Africa, and of course my region is not listed. Is there a workaround that you might suggest? I don't even know what the regions are there for. I'm a programmer and I'd like to try this desktop application, but I'd also like to perhaps fork from DiaKEM to make something like a SugarPixel, but open sourced and easy to put together. My very young child is T1 and it would be an incredible asset to all those that care for him if there were a better early warning and notification system. In turn, ours is a poor country and most parents of T1 kids are far below the economic line to afford a SugarPixel - something that helps parents in general would be just wonderful. Many thanks! |
Thanks for your kind words.
I suppose that South Africa does not have an own endpoint.
Since I am not using the official Libre 3 Android app anymore because I moved from ICT to CSII with CamAPS I got an Nightscout instance and tried the Nightscout Clock.
You're welcome! |
What do you think about creating a new endpoint Global that directly calls https://api.libreview.io/llu, @KiSa04 & @fperera123? |
Wow, @CrazyMarvin - hats off for the quickest github response I've ever seen! Thanks - a global endpoint would be appreciated for sure. It's not just us; Libre 2 is in wide use around the world and not covered by the endpoint list. In fact (and rather cynically), I think Libre 2 is being peddled widely in the 3rd world because it has been deprecated by the Libre 3. Many of us believe that Abbott is trying to ditch stock while it still has some use, although their support for it is not great because their attention is on the Libre 3 userbase. I have checked out the Nightscout Clock #wicked and I loved it! However, the setup for Nightscout is extremely technical and most Average Parents just can't get all of that organized, even though the benefits are terrific. I'm keen to make a clock that just scours the data like a LibreLinkup follower - no server instance, no fiddling. Well, that's the dream. Cheers! |
Can you test if the global endpoint https://api.libreview.io/llu works for you?
The endpoints should work for Libre 2 and 3 in the same way.
Let us know when your clock is ready. 🥳 |
As i explained before, that should be the standard call! the login call at the global API (https://api.libreview.io/llu) returns one of three results:
you should check which does it return. If it returns a region, then you need to call "https://api-{region}.libreview.io/llu" and proceed as usual. that avoids asking the user for its region |
At the moment the user needs to select the correct endpoint manually.
Do you have an idea how to automate it, @KiSa04?
The text was updated successfully, but these errors were encountered: