How to Download Minute-by-Minute Fitbit Data

September 26, 2014

NOTE: The methods detailed in this post no longer work. The post is kept here for archival purposes, but unfortunately you will not be able to access your Fitbit data by following the steps.

IntradayDataChart

Earlier this week we posted an update to our How To instructions for downloading your Fitbit data to Google Spreadsheets. This has been one of our most popular posts over the past few years. One of the most common requests we’ve received is to publish a guide to help people download and store their minute-by-minute level step and activity data. Today we’re happy to finally get that up.

The ability to access and download the minute-by-minute level (what Fitbit calls “intraday”) data requires one more step than what we’ve covered previously for downloading your daily aggregate data. Access to the intraday data is restricted to individuals and developers with access to the “Partner API.” In order to use the Partner API you must email the API team at Fitbit to request access and let them know what you intend to do with that data. Please note that they appear to encourage and welcome these type of requests. From their developer documentation:

Fitbit is very supportive of non-profit research and personal projects. Commercial applications require additional review and are subject to additional requirements. To request access, email api at fitbit.com.

In the video and instructions below I’ll walk you through setting up and using the Intraday Script to access and download your minute-by-minute Fitbit Data.

  1. Set up your FitBit Developer account and register an app.
    • Go to dev.fitbit.com and sign in using your FitBit credentials.
    • Click on the “Register an App” at the top right corner of the page.
    • Fill in your application information. You can call it whatever you want.
    • Make sure to click “Browser” for the Application Type and “Read Only” for the Default Access type fields.
    • Read the terms of service and if you agree check the box and click “Register.”
  2. Request Access to the Partner API
    • Email the API team at Fitbit
    • They should email you back within a day or two with  response
  3. Copy the API keys for the app you registered in Step 1
    • Go to dev.fitbit.com and sign in using your FitBit credentials.
    • Click on “Manage My Apps” at the top right corner of the page
    • Click on the app you created in Step 1
    • Copy the Consumer Key.
    • Copy the Consumer Secret.
    • You can save these to a text file, but they are also available anytime you return to dev.fitbit.com by clicking on the “Manage my Apps” tab.
  4. Set up your Google spreadsheet and script
    • Open your Google Drive
    • Create a new google spreadsheet.
    • Go to Tools->Script editor
    • Download this script, copy it’s contents, and paste into the script editor window. Make sure to delete all text in the editor before pasting. You can then follow along with the instructions below.
    • Select “renderConfigurationDialog” in the Run drop down menu. Click run (the right facing triangle).
    • Authorize the script to interact with your spreadsheet.
    • Navigate to the spreadsheet. You will see an open a dialog box in your spreadsheet.
    • In that dialog paste the Consumer Key and Consumer Secret that you copied from your application on dev.fitbit.com. Click “Save”
    • Navigate back to the scrip editor window.
    • Select “authorize” in the Run drop down menu. Click run (the right facing triangle).
    • Select “authorize” in the Run drop down menu. This will open a dialog box in your spreadsheet. Click yes.
    • A new browser window will open and ask you to authorize the application to look at your Fitbit data. Click allow to authorize the spreadsheet script.
  5. Download your Fitbit Data
    • Go back to your script editor window.
    • Edit the DateBegin and DateEnd variables with the date period you’d like to download. Remember, this script will only allow 3 to 4 days to be downloaded at a time. 
    • Select “refreshTimeSeries” in the Run drop down menu. Click run (the right facing triangle).
    • Your data should be populating the spreadsheet!

If you’re a developer or have scripting skills we welcome your help improving this intraday data script. Feel free to check out the repo on Github!

Related Posts

CGM Show&Tell June 13 2023

Gary Wolf

June 13, 2023

NOTE: The methods detailed in this post no longer work. The post is kept here for archival purposes, but unfortunately you will not be able to access your Fitbit data by following the steps. Earlier this week we posted an update to our How To instructions for downloading your Fitbit data to Google Spreadsheets. This...

New Show&Tell Event: Tracking Blood Glucose

Gary Wolf

May 31, 2023

Please join us for an hour of short "QS Show&Tell" talks about diet and metabolic discoveries using personal science. This session will focus on minimally invasive blood glucose monitor and meal and activity tracking with Nutrisense.

Astronauts

Gary Wolf

February 23, 2023

We The Scientists, a new book by Amy Dockser Marcus, tells the story of a group of families who force research attention on a rare disease