Cannot create Temperature Data Source?

50 Views Asked by At

I'm trying to create the temperature data source via REST and it keeps on failing with:

Data type does not match well-known data type with the same name

The data I'm sending in is:

{"application":{...Same as other working samples....},"dataType":{"field":[{"name":"body_temperature","format":"floatPoint"},{"name":"measurement_location","format":"integer","optional":true}],"name":"com.google.body.temperature"},"name":"Temperature Feed","type":"raw","dataStreamId":"raw:com.google.body.temperature:XXX"}

Per https://developers.google.com/fit/datatypes/health#body_temperature , I am not seeing any reason this shouldn't work -- what am I doing wrong? Does temperature require special permission?

Thanks.

Eric

1

There are 1 best solutions below

0
On

The issue is that measurement_location must be body_temperature_measurement_location in the REST request. After changing that, it now works.