0

I'm struggling to figure out how the smart device management API works. The end goal is to fetch a status of my nest thermostat on an ongoing basis for logging purposes, using service account credentials:

await using var stream = new FileStream(path, FileMode.Open, FileAccess.Read);
var credential = GoogleCredential.FromStream(stream)
    .CreateScoped(SmartDeviceManagementService.ScopeConstants.SdmService);

var service = new SmartDeviceManagementService(new BaseClientService.Initializer()
{
   HttpClientInitializer = credential
});

This appears to be correct, however when I try and call service.Enterprises.Devices.List() it requires a parent ID in the format of "^enterprises/[^/]+/devices/[^/]+$ But I do not know how to acquire this parent ID to begin testing my code.

Does anyone know how to obtain these strings which seem to be necessary to use the API?

Simon
  • 33
  • 4

1 Answers1

0

Have you registered from a project id via the Device Access Console? https://console.nest.google.com/device-access

That seems to be what you're looking for.

Ethan
  • 136
  • 4