Hey there,
we want to integrate the fitbit api in our app - so far so good - everyhting is working fine 🙂
Question:
For our purpose we want to query the last XX activitis from a user. Sadly "getRecentActitivts" doesn't seem to do so.
So - is there any way to get all actitvis for let's say a week instead of send 7 seperat querys?
Best, Nico
Best AnswerHey,
i am currently trying to get the activits - but for any reason the result contains only value-pairs with the value "0".
{
[INFO] : activities = (
[INFO] : );
[INFO] : goals = {
[INFO] : activeMinutes = 30;
[INFO] : caloriesOut = 2184;
[INFO] : distance = "8.050000000000001";
[INFO] : steps = 10000;
[INFO] : };
[INFO] : summary = {
[INFO] : activeScore = "-1";
[INFO] : activityCalories = 0;
[INFO] : caloriesBMR = 1304;
[INFO] : caloriesOut = 1884;
[INFO] : distances = (
[INFO] : {
[INFO] : activity = total;
[INFO] : distance = 0;
[INFO] : },
[INFO] : {
[INFO] : activity = tracker;
[INFO] : distance = 0;
[INFO] : },
[INFO] : {
[INFO] : activity = loggedActivities;
[INFO] : distance = 0;
[INFO] : },
[INFO] : {
[INFO] : activity = veryActive;
[INFO] : distance = 0;
[INFO] : },
[INFO] : {
[INFO] : activity = moderatelyActive;
[INFO] : distance = 0;
[INFO] : },
[INFO] : {
[INFO] : activity = lightlyActive;
[INFO] : distance = 0;
[INFO] : },
[INFO] : {
[INFO] : activity = sedentaryActive;
[INFO] : distance = 0;
[INFO] : }
[INFO] : );
[INFO] : fairlyActiveMinutes = 0;
[INFO] : lightlyActiveMinutes = 0;
[INFO] : marginalCalories = 0;
[INFO] : sedentaryMinutes = 1440;
[INFO] : steps = 0;
[INFO] : veryActiveMinutes = 0;
[INFO] : };
[INFO] : } Like seen above...
This is my test query, like in the docs:
url : 'https://api.fitbit.com/1/user/'+req.query.userid+'/activities/date/2014-07-12.json',
(On this date there is data as seen in my fitbit account. Requesting it over the api-Explorer is working fine.)
Any help would be really nice!
Best AnswerTry using - for the userid instead of the 6 char id. Are you using the particular user's token to make the request? If not, its most likely its 0 due to privacy settings for the user.
Best AnswerI'm here with the same problem. I used your official API Explorer and can get no activities
kind regards,
Frank
Best Answer
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.