10-05-2023 14:02
10-05-2023 14:02
Hello Fitbit team,
We did a request to gain access to the intraday API some days ago and it was granted. The Application ID is 23R9D7 and the client ID: 23R9D7.
Have been trying to figure it out what I might be doing wrong when making a CURL request to get the Intraday Steps as I am not able to get the intraday data object in the response.
I am running this command:
curl -X GET "https://api.fitbit.com/1/user/-/activities/steps/date/VALID-DATE/1d/15min.json" \
-H "accept: application/json" \
-H "authorization: Bearer <TOKEN>"
Am getting as a sole response the following payload:
{"activities-steps":[{"dateTime":"VALID-DATE","value":"11005"}]}
This is the data stored on my linked account:
Any ideas of what can be missing @JohnFitbit @GordonFitbit ?
Thanks
Answered! Go to the Best Answer.
10-16-2023 11:47
10-16-2023 11:47
Hi @vidriloco
I'm not sure. I tested your curl statement and it is working correctly for me. You could try our Web API Explorer tool to see if you get the data back. It will provide you with a curl statement as well, which you can call from a command prompt.
Gordon
10-05-2023 14:51
10-05-2023 14:51
By the way, your forum does not allow to place date values, so, in the code snippet: VALID-DATE corresponds to October 3rd 🤷🏼:male_sign:
10-06-2023 08:36
10-06-2023 08:36
Hi @vidriloco
If your endpoint is using the date value of "2023-10-03", the number of steps returned by the endpoint (11005) is not matching the total number of steps (8965) in the picture you provided. Do you have multiple applications registered on dev.fitbit.com or might be using the access token for a different user?
Gordon
10-09-2023 16:25
10-09-2023 16:25
Hey @Gordon-C,
Thanks for your reaction. In the screenshot I missed a row, which yields altogether the correct result (11005). I believe I am using the right auth token for the user. What could be wrong in my CURL request so that is not yielding the whole intraday object?
10-16-2023 11:47
10-16-2023 11:47
Hi @vidriloco
I'm not sure. I tested your curl statement and it is working correctly for me. You could try our Web API Explorer tool to see if you get the data back. It will provide you with a curl statement as well, which you can call from a command prompt.
Gordon