Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Getting activity

ANSWERED

I'm trying to replicate the "Activity History" under "Recent Exercise" tile on the dashboard. I've tried two different endpoints. 

 

1. "https://api.fitbit.com/1/user/-/activities/date/2015-10-03.json" gets me activity for the day, but never tells me if I played soccer or ran. It only says "tracker" or "logged activity".

 

2. "https://api.fitbit.com/1/user/-/activities/list.json" returns 0 activities.  

Here's what I'm sending.

header = {"Authorization" : str("Bearer " + str(self.accessToken))}
payload = {"offset" : "1",
          "limit" : "100",
          "beforeDate" : "2015-10-08",
          "sort" : "asc"
}

urlHRsecon = "https://api.fitbit.com/1/user/-/activities/list.json"
r = requests.get(urlHRsecon, headers = header, params=payload)

And the response.

{u'activities': [], u'pagination': {u'sort': u'asc', u'next': u'', u'limit': 100, u'offset': 1, u'beforeDate': u'2015-10-03', u'previous': u'https://api.fitbit.com/1/user/-/activities/list.json?offset=0&limit=100&sort=asc&beforeDate=2015-10-03'}}

But in the app and webpage I have exercise on the 7th, 6th, 3rd, etc.

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

Exercises logged on Fitbit devices do not yet appear in the API—only manually logged activities will be returned. Please see https://community.fitbit.com/t5/Web-API/Potentially-breaking-change-to-Get-Activities-endpoint/m-p/7...

View best answer in original post

Best Answer
0 Votes
4 REPLIES 4

Exercises logged on Fitbit devices do not yet appear in the API—only manually logged activities will be returned. Please see https://community.fitbit.com/t5/Web-API/Potentially-breaking-change-to-Get-Activities-endpoint/m-p/7...

Best Answer
0 Votes

Fair enough. This is something you plan to integrate at some point?

Best Answer
0 Votes

Yes. Unfortunately, I don't have a target release date to share yet.

Best Answer
0 Votes

Looking forward to it.

Best Answer
0 Votes