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

Using fitbit http request cannot get a log id

I use the following link for http request by replacing releavnt date and user-id, but the response body only show the activity minutes and the summary but not include the log id, what's wrong?

https://api.fitbit.com/1/user/[user-id]/activities/date/[date].json

 

Best Answer
0 Votes
3 REPLIES 3

@ust Either there are no logged activities for the date you're requesting, or you're requesting data from another user rather than the current user logged in. Replace user-id with the "-", and make sure there are logged activities.

Andrew | Community Moderator, Fitbit

What motivates you?

Best Answer
0 Votes

What do you mean of logged activities?

Best Answer
0 Votes

@ust Logged activities meaning activities that are manually entered. If I have a 'Walk' logged on my account for today and I make this call:

https://api.fitbit.com/1/user/-/activities/date/today.json

 

I will get this:

{
  "activities": [
    {
      "activityId": 90013,
      "activityParentId": 90013,
      "activityParentName": "Walk",
      "calories": 222,
      "description": "Walking less than 2 mph, strolling very slowly",
      "distance": 5.1499,
      "duration": 3600000,
      "hasStartTime": true,
      "isFavorite": false,
      "lastModified": "2017-01-04T15:34:18.000Z",
      "logId": 5429194194,
      "name": "Walk",
      "startDate": "2017-01-04",
      "startTime": "05:03",
      "steps": 7294
    }
  ],

[...]

 

You can also use the "Get Activity Logs List" endpoint.

Example:

https://api.fitbit.com/1/user/-/activities/list.json?beforeDate=2016-09-23&sort=desc&limit=10&offset=0

 

Andrew | Community Moderator, Fitbit

What motivates you?

Best Answer
0 Votes