Can't write value in my thermostat



I strictly follow the documentation to do my first try. I can read values of my thermostat but i can’t write value ({“target_temperature_f”: 65}). In my oAuth client, my authorization are read/write.

My request:

POST /devices/thermostats/XXXXXXXXXXXXXX HTTP/1.1
Content-Type: application/json
Authorization: Bearer XXXXXXXXXXX
cache-control: no-cache
Postman-Token: 2ab9c0ab-1821-4c33-b333-85c52ce5a7fb
{“target_temperature_f”: 65}------WebKitFormBoundary7MA4YWxkTrZu0gW–

what am I doing wrong ?



Do you get an error in response when you make the call?


Yes. Unauthorized. No problem when I read a value with the same id/secret/token

“error”: “unauthorized”,
“type”: “”,
“message”: “unauthorized”,
“instance”: “4fe4cb80-c791-49ea-a45e-12b8380b11e5”


Are you handling redirects properly, and have the correct permissions selected for the account (Thermostat Read/Write)?


For redirects, it should be automatic (i use Postman for the test) and correct permissions are selected


When you make the write call, are you using smart quotes for the field name? Or dumb quotes? I noticed in what you’ve posted that they appear to be smart:


vs dumb:


I believe you need to use dumb quotes.

Also if you’re using Postman, provide screenshots of what your write calls look like. If you have the right permission and can read, then you should be able to write.



When I have read your message, I hoped to do this mistake but not … my quotes are correct :frowning: I joined a screenshot




nobody has an idea, I’m totally desperate.


Your screenshots show “POST” as the request type (just to the left of the URL), can you try it with PUT as noted in the docs?


Yes you are right, I will test that.


It was that … sorry for the unconvenience


No worries, glad we figured it out. :slight_smile: