The Resource Access API is the main part of Fitbit API and contains of long list of REST endpoints that allow reading and modifying user resources via their URLs. Currently we provide methods to work with tracker collections and their metadata, profile and social resources and actions, user's device data and general system resources. The most basic example of resources are user's activities and food log entries. Examples of resource URLs for them are:

Getting started:

Note, that updating application's Access Type for extended permissions (changing from Read to Read & Write) resets ALL existing access tokens for your application and removes ALL existing subscriptions to user resources.

 

Rate Limiting

All Read calls (as well as couple of sensitive Read & Write) are rate limited with the current quota of 150 calls/hour. Rate limiting is based either on CLIENT+VIEWER or CLIENT (for calls made on behalf of application, without access token in authorization header) quota types, where CLIENT is your application and VIEWER is the authorized user who makes the request. Each API application has only one CLIENT quota and number of the CLIENT+VIEWER quotas, one for each of the application's authorized users. When the limit is reached for the user or for client application API will response with 409 http status code and a json or xml message explaining what have happened (in a meantime we also will send an email to email developer's address the app was registered with explaining what have happened).

Privacy controls

As described in Getting started some calls allow to fetch resources of other users with full OAuth authorization on behalf of the authorized user or public data without full OAuth authorization on behalf of the client. Currently following user profile privacy controls affect the visibility of this data: About Me, Age and height, Location (affect profile fields visibility), Weight & BMI, Activities, Foods, Friends, Sleep (affect complete access to those endpoints). Authorized user always has access to all of his own data and doesn't affected by privacy controls.

API Unit System

The Fitbit system uses a range of units in its internal representations of data. Values that you read or write to the API should be associated with one of the unit systems we support. API defaults to metric units system. The unit system that you pass to API doesn't affect or affected by user profile defaults.

Timestamps in the API

All date and time related fields in the API requests and responses are rendered in the local time of the resource owner's timezone (either authorized user or the owner of the resource requested). The timezone setting and the UTC offset for the particular user could be easily fetched via the Get User Info call. Currently we are not providing the timezone with each and every response field, thinking about the data behind more as "days of my activity" versus the continuous activity stream.

Groups of endpoints

To simplify understanding of API architecture we divided all calls into several groups: user profile data, user collection resources (most important data), user social resources, user device data and general reference data (the only collection that is not attached to any specific user). We also tagged calls with "collection" tag to help you find the whole set of calls for that collection.

User Profile Data

Most basic API calls help to get and update profile info for the user. Note, that you can fetch profile of other user who have public profile data.

PROFILE

Get User Info

Update User Info

 

 

User Collection Resources

Retrieving Collection Data

There are a variety of API calls available to retrieve data pertaining to a given user, ranging from that user's body measurements to their activities, logged foods and sleep. Remember, all of these calls are governed by the privacy settings that a user has applied to their account if you are fetching data of other users.

Get Water Goal

BODY

ACTIVITIES

FOODS

SLEEP

HEART

BP

GLUCOSE

Get Body Measurements

Get Activities

Get Food Logs

Get Sleep

Get Heart Rate

Get Blood Pressure

Get Glucose

Get Body Weight

 

Get Water

 

 

 

 

Get Body Fat

 

 

 

 

 

 

 

 

 

 

 

 

 

Get Body Weight Goal

Get Activity Daily Goals

Get Food Goals

 

 

 

 

Get Body Fat Goal

Get Activity Weekly Goals

Get Water Goal

 

 

 

 

Logging & Deleting Collection Data

Fitbit API has a number of calls available to log and delete collection tracker's data for the authorized user. The log methods are complimentary to the read methods enumerated above, and can be used together with collection metadata calls to retrieve what should be logged in each case. Please be careful and respectful when using these methods, and, as always, adhere to the Terms of Service when removing data on behalf of a user, there is no undo.

BODY

ACTIVITIES

FOODS

SLEEP

HEART

BP

GLUCOSE

Log Body Measurements

Log Activity

Log Food

Log Sleep

Log Heart Rate

Log Blood Pressure

Log Glucose

Log Body Weight

 

Log Water

 

 

 

 

Log Body Fat

 

 

 

 

 

 

 

 

 

 

 

 

 

Update Body Weight Goal

Update Activity Daily Goals

Update Food Goals

 

 

 

 

Update Body Fat Goal

Update Activity Weekly Goals

Update Water Goal

 

 

 

 

 

 

 

 

 

 

 

Delete Body Weight Log

Delete Activity

Delete Food

Delete Sleep

Delete Heart Rate

Delete Blood Pressure

 

Delete Body Fat

 

Delete Water

 

 

 

 

 

 

Retrieving Statistical Data

To build visualizations or gather range of statistics for the logged data on authorized user's behalf, it is possible to retrieve a variety of data for a given time period. This data currently has daily detail.

BODY, ACTIVITIES, FOODS, SLEEP

ACTIVITIES

Get Time Series

Get Activity Stats

 

 

Collection Metadata

There are also several calls for reading, creating and deleting authorized user's collections metadata, that can help develop interfaces similar to Fitbit website trackers, but most commonly GET calls should be used to assist creating of log entries for those trackers.

ACTIVITIES

FOODS

Get Recent Activities

Get Recent Foods

Get Frequent Activities

Get Frequent Foods

Get Favorite Activities

Get Favorite Foods

 

 

Add Favorite Activity

Add Favorite Food

Delete Favorite Activity

Delete Favorite Food

 

 

 

Get Meals

 

Create Food

 

 

User Social Resources

The distinct category of API endpoints provides access to platform social features like friend lists, leaderboards and also contains endpoints that allow to invite other user's to become friends and accept those invites.

FRIENDS

INVITE

BADGES

Get Friends

Get Invites

Get Badges

Get Friends Leaderboard

Create Invite

 

Config Friends Leaderboard

Accept/Reject Invite

 

 

 

User Device Data

Some applications may want to retrieve information about tracker devices status associated with the authorized user. Currently we provide only battery life status for each device.

DEVICES

TRACKERS

Get Devices

Get Alarms

 

Add Alarm

 

Update Alarm

 

Delete Alarm

 

General Resources

There is a bunch of calls that describe general Fitbit system metadata like food database and catalog of activities that is not attached to specific user.

ACTIVITIES

FOODS

Browse Activities

Search Foods

Get Activity

Get Food

 

Get Food Units