Skip to content

Instantly share code, notes, and snippets.

@germainlefebvre4
Created December 26, 2018 22:39
Show Gist options
  • Save germainlefebvre4/c0d8195f5c9ee8d3fc2112e6c6d870a5 to your computer and use it in GitHub Desktop.
Save germainlefebvre4/c0d8195f5c9ee8d3fc2112e6c6d870a5 to your computer and use it in GitHub Desktop.
# Request your access_token (expires every 10-15 minutes)
curl -X POST -s "https://auth.tado.com/oauth/token" -d client_id=tado-web-app -d grant_type=password -d client_secret=xxxxxxxxx -d '[email protected]' -d 'password=myPassword' -d scope=home.user
{"access_token":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI1YzIyOTliNmQ2MDE4MDAwMDg4ZGJhNGEiLCJ0YWRvX2hvbWVzIjpbeyJpZCI6MjgzNzg3fV0sImlzcyI6InRhZG8iLCJsb2NhbGUiOiJmciIsImF1ZCI6InBhcnRuZXIiLCJuYmYiOjE1NDU4NjI4NTQsInRhZG9fc2NvcGUiOlsiaG9tZS51c2VyIl0sInRhZG9fdXNlcm5hbWUiOiJnZXJtYWluLmxlZmVidnJlNEBnbWFpbC5jb20iLCJuYW1lIjoiR2VybWFpbiBMZWZlYnZyZSIsImV4cCI6MTU0NTg2MzQ1NCwiaWF0IjoxNTQ1ODYyODU0LCJ0YWRvX2NsaWVudF9pZCI6InRhZG8td2ViLWFwcCIsImp0aSI6IjEzYzdlOTA4LTQzOWEtNDA5OC04OWMyLTZmNWFlYjhlODM5NyIsImVtYWlsIjoiZ2VybWFpbi5sZWZlYnZyZTRAZ21haWwuY29tIn0.Otrk9iAM3AM3suRTGgYh9FcTL1onsD3wEbHAHhBv1RD9mTnFv_Uds-NOXtZJpWApq_R0i5d-Lfy64UCdN3EW5DEb8QaCyvwmjOpgFEU1WvRNamh_dZGzB_AwCkI10qVe5qSpKL-_I51zxUsLmhOubfUJZE9wjBNVDMXVyq8vX-rzFIrJH3dfdgTalYyUYlrU3oBs2Q5eSCzR8dh09fBfIC_vyoaZShmWnjCk4UMdW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599,"scope":"home.user","jti":"13c7e908-439a-4098-89c2-6f5aeb8e8397"}
# Query Tado with the Bearer
curl "https://my.tado.com/api/v2/me" -H "Authorization: Bearer access_token"
# Queries don't forget the Bearer
curl https://my.tado.com/api/v2/me
# Query your home number
curl https://my.tado.com/api/v2/homes/
# Show your home informations
curl https://my.tado.com/api/v2/homes/123456
# Show your zone 1 Thermostat state
curl https://my.tado.com/api/v2/homes/123456/zones/1/state
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment