I'm developing a web application which requires to fetch user's steps count fromt Google Fit periodically. I went through the API docs and found the REST End Point : https://www.googleapis.com/fitness/v1/users/me/dataset:aggregate which gives the steps count. I'm passing the data to this POST end point in below format.
{
"aggregateBy": [
{
"dataTypeName": "com.google.step_count.delta",
"dataSourceId": "derived:com.google.step_count.delta:com.google.android.gms:estimated_steps"
}
],
"bucketByTime": {
"durationMillis": 86400000
},
"startTimeMillis": 1630568107871,
"endTimeMillis": 1630571402415
}
The steps count returned from the above request is different from the ones showing in my Google Fit app. I tried searching this for days but didn't found anything. How can I get the correct steps from this API as shown on the Google Fit app