Skip to content

Instantly share code, notes, and snippets.

@khskekec
Last active September 8, 2025 02:15
Show Gist options
  • Save khskekec/6c13ba01b10d3018d816706a32ae8ab2 to your computer and use it in GitHub Desktop.
Save khskekec/6c13ba01b10d3018d816706a32ae8ab2 to your computer and use it in GitHub Desktop.
HTTP dump of Libre Link Up used in combination with FreeStyle Libre 3
@adamlounds
Copy link

Quirk of the day: today I got {"message":"invalid or expired jwt"} back from POST /llu/auth/login. My credentials were correct, but I needed to accept terms and conditions in the librelinkup app ¯\_(ツ)_/¯

@sgmoore
Copy link

sgmoore commented Sep 6, 2025

Quirk of the day: today I got {"message":"invalid or expired jwt"} back from POST /llu/auth/login. My credentials were correct, but I needed to accept terms and conditions in the librelinkup app ¯_(ツ)_/¯

If you haven't stored all your responses then you can't verify what I am about to say, but I don't think the message was as a response from the `POST /llu/auth/login' , but the next stage.

It seems to be a common issue and most of the third party routines I've seen don't seem to handle the login process correctly, but assume that if you get an HttpStatus of OK when you can proceed as normal, but you are supposed to look at the status inside the response message and if this is 4, look to see if you need to perform an extra step.

So you should have gotten a response which looks something like


{
  "status": 4,
  "data": {
    "step": {
      "type": "pp",
      "componentName": "AcceptDocument",
      "props": {
        "reaccept": true,
        "titleKey": "Common.privacyPolicy",
        "type": "pp"
      }
    },

   ...

  }
}

If you get a status 4 and a step in your response, you are supposed to post a request to auth/continue/xxxx where xxxx is the type (so in this case the request would go to auth/continue/pp .

You might have several of these steps until you get a response with status 0 which means you can continue as normal.

@adamlounds
Copy link

Yeah, part of me is really annoyed at not capturing everything - but the other half is happy to have fixed my nightscout feed after a power outage.
As it says in an earlier comment, the authtoken is valid for 6 months, so my code almost never calls the earlier stages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment