Doing a Get Request returns 200 OK, but no data


#1

I have Read/Write permission with our Thermostat and Cameras, but when I do a GET to https://developer-api.nest.com with the Content-Type json and the Authorization with the OAuth code I get a 200 OK message, but just {} in the body. I have tried with my personal Nest account I get the data from my thermostats, but not sure why my work account is not working when it is setup the same way. Any ideas?


#2

Did you authorize each account separately, so you have a different access token for each (personal vs work account) to use in the API call?


#3

Jeff, I believe the problem is that I am not the owner of this structure so when I setup the OAuth account everything appears to be working, but does not send any data. Am I correct that the owner of the structure has to setup the OAuth? If that is the case can the owner setup an OAuth that is specific to a single structure on his account?


#4

Yes, only structure owners can authorize an WWN connection. Is the work account you’re referencing shared like a family account?


#5

Yes it is. Can you do an OAuth for specific structures?


#6

The owner of that structure has to do the authorization. So if you’re manually getting an access token as described here, you have to be logged into home.nest.com as that owner account (not your non-owner account) during that process. Then use that access token for API calls and it should work.