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

Using with Google Health API

Hi, noob here, we started dev using the charge 6 with the google heath api using python based on examples on:

this:
https://developers.google.com/health/libraries#python

as well as endpoints listed here:
https://developers.google.com/health/reference/rest/v4/users.dataTypes.dataPoints


At this stage, we included all the scopes as we are having trouble obtaining data from the data points, as not all datapoint returns data. In this case, we are trying to retrieve heartRate.

Most of the python code are the same with what was listed on the example.
The only difference:
response = client.users().dataTypes().dataPoints().list(parent="users/me/dataTypes/heartRate").execute()

The response: "Invalid data type ID referenced in the parent data type collection: heartRate". Details: "[{'@type': 'type.googleapis.com/google.rpc.ErrorInfo', 'reason': 'INVALID_PARENT_DATA_TYPE_COLLECTION', 'domain': 'health.googleapis.com', 'metadata': {'dataType': 'heartRate'}}, {'@type': 'type.googleapis.com/google.rpc.BadRequest', 'fieldViolations': [{'field': 'parent', 'description': "The data type ID 'heartRate' is not supported."}]}]">

Hence, we want to get some insight of what could we have gone wrong here?

Thank you!

Best Answer
0 Votes
2 REPLIES 2

Hi @octega 

Thank you for your patience.   In your endpoint syntax, try "heart-rate" instead of "heartRate".

Best Answer

Thank you!

Best Answer
0 Votes