The API Specification section provides a detailed overview of the technical components essential for integrating with the platform, including authorization scopes, data type definitions, and endpoint structures. This API represents a strategic evolution of the legacy Fitbit Web API, rebuilt on modern infrastructure to ensure a more stable and consistent developer experience.
Scopes
You must update your authorization request to use the Google Health API scopes. The scopes define whether your app supports read or write operations. Don't use scopes that are not needed for your app. You can always add more scopes later if the design of your app changes.
The Google Health API scopes are a HTTP URL beginning with https://www.googleapis.com/auth/googlehealth.{scope}. For example, https://www.googleapis.com/auth/googlehealth.activity_and_fitness.writeonly.
Scope mappings
Here is how the Fitbit Web API scopes map to the Google Health API scopes:
| Fitbit Web API Scopes | Google Health API Scopes |
|---|---|
| activity | .activity_and_fitness.readonly
.activity_and_fitness.writeonly |
| blood_glucose | .health_metrics_and_measurements.readonly
.health_metrics_and_measurements.writeonly |
| cardio_fitness | .activity_and_fitness.readonly
.activity_and_fitness.writeonly |
| electrocardiogram | .ecg.readonly
|
| heartrate | .health_metrics_and_measurements.readonly
.health_metrics_and_measurements.writeonly |
| irregular_rhythm_notifications | .irn.readonly
|
| location | .location.readonly
|
| nutrition | .nutrition.readonly
.nutrition.writeonly |
| oxygen_saturation | .health_metrics_and_measurements.readonly
.health_metrics_and_measurements.writeonly |
| profile | .profile.readonly
.profile.writeonly |
| respiratory_rate | .health_metrics_and_measurements.readonly
.health_metrics_and_measurements.writeonly |
| settings | .settings.readonly
.settings.writeonly |
| sleep | .sleep.readonly
.sleep.writeonly |
| temperature | .health_metrics_and_measurements.readonly
.health_metrics_and_measurements.writeonly |
| weight | .health_metrics_and_measurements.readonly
.health_metrics_and_measurements.writeonly |
Data types
Here is a list of Google Health API data types and how they map to the Fitbit Web API.
| Fitbit Web API Data Type | Google Health API Data TypedataType |
|---|---|
| Activity Calories | Active Energy Burnedactive-energy-burned
|
| Active Zone Minutes | Active Zone Minutesactive-zone-minutes
|
| Contains changes to the user's activity levels | Activity Levelactivity-level
|
| Elevation | Altitudealtitude
|
| Blood Glucose | Blood Glucoseblood-glucose
|
| Body fat | Body Fatbody-fat
|
caloriesOut in each heart rate zone |
Calories In Heart Rate Zonecalories-in-heart-rate-zone
|
| Temperature (Core) | Core Body Temperaturecore-body-temperature
|
| HRV summary | Daily Heart Rate Variabilitydaily-heart-rate-variability
|
| SpO2 summary | Daily Oxygen Saturationdaily-oxygen-saturation
|
| Resting heart rate | Daily Resting Heart Ratedaily-resting-heart-rate
|
| Skin temperature | Daily Sleep Temperature Derivationsdaily-sleep-temperature-derivations
|
| Distance | Distancedistance
|
| Electrocardiogram (ECG) | Electrocardiogram (ECG)electrocardiogram
|
| Recorded activity | Exerciseexercise
|
| Floors | Floorsfloors
|
| Food | Foodfood
|
| Food Measurement Unit | Food Measurement Unitfood-measurement-unit
|
| Heart Rate | Heart Rateheart-rate
|
| HRV Intraday | Heart Rate Variabilityheart-rate-variability
|
| Irregular Rhythm Notifications (IRN) | Irregular Rhythm Notificationirregular-rhythm-notification
|
| Food Log | Nutrition Lognutrition-log
|
| SpO2 Intraday | Oxygen Saturationoxygen-saturation
|
| VO2 Max value when the user runs | Run VO2 Maxrun-vo2-max
|
| Activity time series minutes sedentary | Sedentary Periodsedentary-period
|
| Sleep | Sleepsleep
|
| Steps | Stepssteps
|
| Activity time series swimming strokes | Swim Lengths Dataswim-lengths-data
|
Activity caloriesOut |
Total Caloriestotal-calories
|
| VO2 Max value | VO2 Maxvo2-max
|
| Weight | Weightweight
|
Endpoints
The REST endpoints adopt a consistent syntax for all data types.
- Service Endpoint: The base HTTP URL changes to https://health.googleapis.com.
- Endpoint Syntax: The Google Health API supports a limited number of endpoints, which can be used by most of the supported data types. This provides consistent syntax for all data types and makes the endpoints easier to use.
- User Identifier: Either the user ID or me should be specified in the endpoint syntax. When using me, the user ID is inferred from the access token.
Example: Here's an example of the GET Profile endpoint called using the Google Health API
GET https://health.googleapis.com/v4/users/me/profile
Endpoint mappings
See Google Health API data types table for a list of data types available and the API methods they support.
| Fitbit Web API Endpoint Type | Google Health API |
| GET (Log | Summary | Daily Summary) where you are requesting a single day of data | dailyRollup method with windowSize = 1 day |
| GET (Intraday) where you are requesting granular data | list method |
| GET (Time Series) by Date or Interval | rollUp or dailyRollUp method including a date range |
| GET (Log List) | list method |
| CREATE & UPDATE Logs | patch method |
| DELETE Logs | batchDelete method |
| GET Profile | users.getProfile returns the user's specific information
users.getSettings returns the user's units and timezones |
| UPDATE Profile | users.updateProfile modifies the user's specific information
users.updateSettings modifies the user's units and timezones |
| Get User ID | users.getIdentity returns the user's Fitbit legacy and Google user ID. |
| Get Devices | users.pairedDevices returns the list of paired devices |
| Create Subscriptions | projects.subscribers.subscriptions.create manually creates a subscription |
| Delete Subscriptions | projects.subscribers.subscriptions.delete delete a subscription |
| Get Subscriptions List | projects.subscribers.subscriptions.list lists all subscriptions |