0

I'm trying the get running distance from Google Fit using the REST API.

After OAUTH2 is set, I send a GET request with Params of a specific Fit activity:

GET https://www.googleapis.com/fitness/v1/users/me/dataSources/632d1b99003e744d:activemode:running:1661369395194/datasets/1661369395240-1661371020715

I receive the following response from the API:

{
    "minStartTimeNs": "1661369395240",
    "maxEndTimeNs": "1661371020715",
    "dataSourceId": "632d1b99003e744d:activemode:running:1661369395194",
    "point": []
}

Ideally, "Point" should include the activity's data including the running distance (fpval). But all I manage to get are empty data points.

Any ideas?

Thanks

1 Answers1

0

Looks like the request is wanting nanosecond resolution for the times, but perhaps you are only providing millisecond resolution? What happens if you add another six zeroes onto the end of those timestamps...

karora
  • 1,223
  • 14
  • 31