08-25-2023 05:06 PM
I am writing a Python script to access my nest thermostat. I am able to generate a token this way:
Answered! Go to the Recommended Answer.
08-30-2023 09:31 AM
Can you please clarify if the Authorization Field in the print access token section should contain the char "f" before the bearer ?Also, can you share the http protocol request (header and data payload) ?
These information will help us in debugging the issue faster.
08-30-2023 09:31 AM
Can you please clarify if the Authorization Field in the print access token section should contain the char "f" before the bearer ?Also, can you share the http protocol request (header and data payload) ?
These information will help us in debugging the issue faster.
08-30-2023 10:09 AM - edited 08-30-2023 10:25 AM
08-30-2023 10:15 AM - edited 08-30-2023 10:29 AM
So my real question is what roles should I assign to the service account so it has access to the project?
I am using:
I assume if the request was not authorized I could get a 404 return code. I have had this working with a user based generated token. I am moving to a service account becuase this is going into a Raspberry PI making continuous interval GETS on Nest Temperature. Refresh Tokens have a shelf life and will eventually expire. So that is why I am using a service account
2 weeks ago
It sounds like the 404 issue is happening because the service account doesn’t have the right permissions assigned to access the Smart Device Management API. You may need to review the roles available in your Google Cloud project and grant the service account access to SDM resources, since without the correct roles it won’t be able to fetch devices. It’s a bit like hiring wall painting services if the painters don’t have the right tools or materials, the job won’t be done properly. Once the right permissions are added, your script should start working as expected.