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

How to get hourly steps count in a specific date using Fitbit API

ANSWERED

I wanted to show 7day steps count in total. Then, I want to show the steps counts by hour (similar to Fitbit iOS App) in a given date. How do I do that?

 

I tried the end point below

 

  1. GET https://api.fitbit.com/1/user/-/[resource-path]/date/[date]/1d/[detail-level]/time/[start-time]/[end...

 

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

Hi, where is the documentation for the steps API please? I cant seem to locate it.

 

View best answer in original post

Best Answer
7 REPLIES 7

@RajaTamil Here's examples of what you're looking for (taken from Fitbit Explorer😞

 

Last 7 days:

 

https://api.fitbit.com/1/user/-/activities/tracker/steps/date/2017-06-06/today.json
{
  "activities-tracker-steps": [
    {
      "dateTime": "2017-06-06",
      "value": "11911"
    },
    {
      "dateTime": "2017-06-07",
      "value": "9146"
    },
    {
      "dateTime": "2017-06-08",
      "value": "10026"
    },
    {
      "dateTime": "2017-06-09",
      "value": "14233"
    },
    {
      "dateTime": "2017-06-10",
      "value": "2804"
    },
    {
      "dateTime": "2017-06-11",
      "value": "1759"
    },
    {
      "dateTime": "2017-06-12",
      "value": "971"
    }
  ]
}

Step count for a single day in 15 min intervals:

https://api.fitbit.com/1/user/-/activities/steps/date/today/1d/15min.json
{
  "activities-steps": [
    {
      "dateTime": "2017-06-12",
      "value": "7731"
    }
  ],
  "activities-steps-intraday": {
    "dataset": [
      {
        "time": "00:00:00",
        "value": 0
      },
      {
        "time": "00:15:00",
        "value": 0
      },
      {
        "time": "00:30:00",
        "value": 0
      },
      {
        "time": "00:45:00",
        "value": 0
      },
      {
        "time": "01:00:00",
        "value": 0
      },
{. . .},
{
        "time": "17:15:00",
        "value": 0
      },
      {
        "time": "17:30:00",
        "value": 0
      }
    ],
    "datasetInterval": 15,
    "datasetType": "minute"
  }
}

 

 

Andrew | Community Moderator, Fitbit

What motivates you?

Best Answer
0 Votes
https://api.fitbit.com/1/user/-/activities/steps/date/today/1d/15min.json

The above endpoint does not return all the data like you mentioned.  "activities-steps-intraday" missing :(.

 

This is what I got back from that endpoint.


{ "activities-steps": [ { "dateTime": "2017-06-12", "value": "7731" } ] }

Thanks in advance.

Best Answer
0 Votes

@RajaTamil Your app needs to have access to Intraday Time Series data, which can be achieved from using a "personal" app type, or by submitting a request for access.

Andrew | Community Moderator, Fitbit

What motivates you?

Best Answer
0 Votes

Hi bro I'm need help from you to setup web Apis. I'm trying since last month to setup web api wiht php but still have not make a single request successfully . I'm search a lot to resolve it but have not find any solution? 

Please i need your help 

contact me sadbox50@gmail.com if possible 

Best Answer
0 Votes

hi bro I'm need your help to setup web Apis 

Best Answer
0 Votes

Hi @DDNPLO ,

 

I recommend checking out our Community Resources for using PHP as your client library. 

 

If you need additional assistance regarding the Web API, let me know and I'll be happy to help.

Best Answer
0 Votes

Hi, where is the documentation for the steps API please? I cant seem to locate it.

 

Best Answer