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

Web Api response data empty

Hi All,

I have registered an Application on dev.fitbit.com and using the ClientId and secret I tried to retrieve data for my device. I am an active fitbit user. I have Versa-3 and on subscription as well. 

My requests are all successful but the response is empty. But on Fitbit App i can see my data.

My question is do it need to get some approval for my application (ClientId and Secret) before I can access data from these apis.

 

Sample curl i am using:

 

curl --location --request GET 'https://api.fitbit.com/1/user/-/hrv/date/2022-08-01/2022-08-31.json' \
--header 'accept: application/json' \
--header 'authorization: Bearer <token>'

 

curl --location --request GET 'https://api.fitbit.com/1/user/-/activities/heart/date/2022-08-01/2022-08-30.json' \
--header 'accept: application/json' \
--header 'authorization: Bearer <token>'

Best Answer
0 Votes
1 REPLY 1

Hi @mwaseem-mnnit 

 

Yes, you will need to consent to share your data with your client ID before you can retrieve the data.   If you would like to test the endpoints outside of your application, check out our Web API Explorer, https://dev.fitbit.com/build/reference/web-api/explore/.  The support team uses it regularly to reproduce developer problems.

 

Gordon

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes