#016: The Dexcom Share API

Christopher Coco
3 min readJan 23, 2025

--

Hello everyone and happy 2025. I know it’s almost a month in but this is my first article for the new year. Today I want to talk a little about something neat that I found for a project I’m starting and that is the Dexcom Share API.

Dexcom Share Logo

Some Context

A little bit of context before I begin, I’m a Type 1 Diabetic so I have had a Dexcom CGM since I got diagnosed. When I first started programming I came across that Dexcom had an API that you could work with to pull data from the sensor. However, that has the limitation of only being able to get readings that happened at least 3 hours ago so getting the current reading is impossible. I have always from time to time searched to see if this is possible and usually I do not find anything. I’m currently in the process of starting up a new project that includes making a widget board on a Raspberry PI (More on this in a future post). One of the features that I want on here is to display your current blood sugar so you can see it at a glance without needed to look at your phone. So I went to search again and came across the Dexcom Share API which I do not know how I missed this before.

The Dexcom Share API

This API is interesting because it is a private API that was found by reverse engineering one of the mobile apps that Dexcom has. I came across it by looking into a Python module called pydexcom. One thing I noticed there was the application id being hard coded and that was the same in a Javascript version of the module as well so after doing more research I came across a Gist on Github that talked about the API.

This API allows you to log in with your username and password and retrieve a session token that can be used to get recent readings from another endpoint. This fixed the problem of not being able to get the most recent bloodsugar.

It amazes me that something like this was able to be reverse engineered making it have a pretty neat story honestly. If you’re a programmer and also a Type 1 Diabetic I would highly recommend playing around with it I had a lot of fun turning my Raspberry PI into a homebew Dexcom reciever even though it was just in the terminal.

My Raspberry PI turned into a homemade Dexcom receiver.

I made a Go module for this API to learn how to write and upload Go modules. If you would like to check it out the link is below.

Conclusion

Well that was a pretty short article, I just wanted to share this neat thing that I found which solved a problem I’ve been trying to find out about for years. I hope everyone is having a great 2025 so far and I’ll see you guys in the next post.

--

--

Christopher Coco
Christopher Coco

Written by Christopher Coco

0 Followers

Student | Aspiring Software Engineer | Massachusetts

No responses yet