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

Google Health API error 500 when fetching sleep records

Hello. 

Right now, when I'm trying to access my sleep records using https://health.googleapis.com/v4/users/me/dataTypes/sleep/dataPoints endpoint, I'm getting 

{ "error": { "code": 500, "message": "Internal error encountered.", "status": "INTERNAL" } } 

This is on the first request, without a page token. 

During my previous attempts to use the API earlier this month, I was getting the same error some of the time, after fetching specific pages. Sometimes, adding ?pageSize=25 (default value) resulted in pages loading when they didn't load without it. Currently, I am unable to get any results from the endpoint with any filters I tried, including setting pageSize to 1 and setting a date filter before my account has any data. 

500.png

This seems to be sleep specific since I am able to fetch heart rate without issues. 

I'm requesting data from the current account (aozoranine at gmail.com)

Edit: the problem seems to have fixed itself as of now, I'll bump the thread if it appears again. 

 

Best Answer
0 REPLIES 0