google-apihome-assistantnest-device-accessgoogle-sdm-api

nest sdm api: empty response when listing devices


I am asking this on stackoverflow because as best I can tell that's the only place Google is providing support for this API, though this really seems to be something that'd require examining my google project to determine the issue.

Anyway, I have repeatedly followed the nest device access quick start guide to the letter, from start to finish with a fresh project, verifying every step reaches the described state. At the end of completing the guide, I can see my project in the Partner Connections list. The SDM API is enabled for the project when I look at the Smart Device Management API page in the developer console, for the correct project.

Manually going through the oauth2 flow, as described in that guide, results in an access token.

However, when I issue a device list call like this (as described in the quick start guide I linked to)

curl -X GET 'https://smartdevicemanagement.googleapis.com/v1/enterprises/<redacted project id>/devices' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer <redacted access token>'

the call returns with a 200, but the entire contents of the response are as follows:

{}

When I look at the Partner Connections page, I can see that I have definitely granted access to the devices I want the project to be able to access. See this screenshot of the partner connections page indicating that I have allowed access to the device I want the API to be able to see.

All authorized callback URLs for oauth2 are https.

I have spent multiple evenings bashing my head against this at this point. What am I doing wrong here?


Solution

  • After my thermostat stopped being listed by the API, I temporarily switched its location to something different, and then I switched it back. For some reason it helped.

    You can find it in Nest webservice: Settings -> About -> Where

    I hope it will work for you, too.