Search code examples
google-fitgoogle-fit-api

DataSource for the location in google fit Rest API


What is the data source for location in the google fit rest API? I'm not able to find any data sources for location. I want to access the location from the google fit application. Does anybody know how can I access a datasourceID for location?

I used the following get request to find the list of data sources. I'm not able to find any relevant dataSourceID for location. Please suggest what to do

GET https://www.googleapis.com/fitness/v1/users/me/dataSources

Solution

  • According to the docs:

    Note: This data can only be read by the app that wrote the data. Your app can only read back data it wrote. It cannot read location sample data written by other apps

    Source: developers.google.com/fit/datatypes/location#location_sample