FitbitAPI

FREE
By dimashirokov
Updated 5 months ago
Health, Fitness
6.1/10
Popularity Score
132ms
Latency
100%
Success Rate

FitbitAPI API Documentation

Access data from Fitbit activity trackers

View API Details
POSTaddFavoriteActivity
POSTaddFavoriteFood
POSTaddSubscription
POSTbrowseActivityTypes
POSTcreateFood
POSTcreateFoodLog
POSTcreateMeal
POSTdeleteBodyFatLog
POSTdeleteCustomFood
POSTdeleteFavoriteActivity
POSTdeleteFavoriteFood
POSTdeleteFoodLog
POSTdeleteMeal
POSTdeleteSleepLog
POSTdeleteWaterLog
POSTdeleteWeightLog
POSTeditMeal
POSTgetAccessToken
POSTgetActivityGoals
POSTgetActivityIntradayTimeSeries
POSTgetActivityTimeSeries
POSTgetActivityType
POSTgetBadges
POSTgetBodyFatLogs
POSTgetBodyGoals
POSTgetBodyTimeSeries
POSTgetDailyActivitySummary
POSTgetDevices
POSTgetFavoriteActivities
POSTgetFavoriteFoods
POSTgetFood
POSTgetFoodGoals
POSTgetFoodLocales
POSTgetFoodLogs
POSTgetFoodOrWaterTimeSeries
POSTgetFoodUnits
POSTgetFrequentActivities
POSTgetFrequentFoods
POSTgetFriendInvitations
POSTgetFriends
POSTgetFriendsLeaderboard
POSTgetHeartRateIntradayTimeSeries
POSTgetHeartRateTimeSeries
POSTgetLifetimeStats
POSTgetMeals
POSTgetProfile
POSTgetRecentActivityTypes
POSTgetSingleMeal
POSTgetSleepGoal
POSTgetSleepLogs
POSTgetSleepTimeSeries
POSTgetSubscriptions
POSTgetWaterGoal
POSTgetWaterLogs
POSTgetWeightLogs
POSTinviteFriend
POSTlogBodyFat
POSTlogSleep
POSTlogWater
POSTlogWeight
POSTrefreshingTokens
POSTremoveSubscription
POSTrespondToFriendInvitation
POSTrevokingAccessTokens
POSTsearchFoods
POSTupdateActivityGoals
POSTupdateBodyFatGoal
POSTupdateFoodGoal
POSTupdateFoodLog
POSTupdateProfile
POSTupdateSleepGoal
POSTupdateWaterGoal
POSTupdateWaterLog
POSTupdateWeightGoal
POSTaddFavoriteActivity

This endpoint add the activity with the given ID to user's list of favorite activities.

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
activityIdSTRING
REQUIREDThe ID of the activity to add to user's favorites.
accessTokenSTRING
REQUIREDThe access token obtained from getAccessToken method.
Code Snippet
unirest.post("https://FitbitAPIdimashirokovV1.p.rapidapi.com/addFavoriteActivity")
.header("X-RapidAPI-Host", "FitbitAPIdimashirokovV1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
General
Request URL: https://FitbitAPIdimashirokovV1.p.rapidapi.com/addFavoriteActivity
Request Method: POST
Response Headers
Response Body

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.post("https://FitbitAPIdimashirokovV1.p.rapidapi.com/addFavoriteActivity")
.header("X-RapidAPI-Host", "FitbitAPIdimashirokovV1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication