I am trying to fetch my blood-glucose data using Google fit rest API and using OAuth 2.0 Playground.
I've manually inserted data in the google fit app (fit app > Browse > Vitals > Blood glucose) and tried to fetch it using REST API and OAuth 2.0 Playground using the following request parameters.
scope: .../auth/fitness.blood_glucose.read
Request Parameters
POST /fitness/v1/users/me/dataset:aggregate HTTP/1.1 Host: www.googleapis.com Content-length: 193 Content-type: application/JSON Authorization: Bearer y**
{ "aggregateBy": [{"dataTypeName": "com.google.blood_glucose"}], "bucketByTime": { "durationMillis": 86400000 }, "startTimeMillis": 1663180200000, "endTimeMillis": 1665772200000 }
I didn't get any errors but neither I got any data for the same. below is the sample response.
{ "bucket": [ { "startTimeMillis": "1663180200000", "endTimeMillis": "1663266600000", "dataset": [ { "dataSourceId": "derived:com.google.blood_glucose.summary:com.google.android.gms:aggregated", "point": [] } ] }, { "startTimeMillis": "1665685800000", "endTimeMillis": "1665772200000", "dataset": [ { "dataSourceId": "derived:com.google.blood_glucose.summary:com.google.android.gms:aggregated", "point": [] } ] } ] }
All the points are empty even though I can see them in my data in google fit.
The issue is persisting particulary for blood glucose while the rest Health data points are working fine.