I'm getting HTTP/1.1 401 Unauthorized if I want to fetch Nest devices using
curl -v -L https://developer-api.nest.com/devices/?auth=<AUTHCODE>
I don't have any device in my Nest account. I think I should get HTTP/1.1 404 Not Found.
I tried to fetch thermostats with this command
curl -v -L https://developer-api.nest.com/devices/thermostats?auth=<AUTHCODE>
then it replies back with HTTP/1.1 200 OK with same AUTHCODE which I think is correct. Again mentioning that I don't have any device in my account.
So there is difference in the response that I'm getting. My question is that why am I getting 401 Unauthorized instead of 404 not found or 200 ok for the first curl command?
I found that if I used the URL you gave:
but also included into the headers:
then it seemed to work!