Home & sleep
Make a new link key
POST
/api/wake/keyAdmin. Needs an unlock token (
x-tempolight-token) while a PIN lock is set; without a lock, anyone can call it.Makes a new wake-up link key; the old one stops working. The key opens the wake and sleep calls only, for phone automations.
Responses
200OKapplication/json
keystring403Locked, or not allowed.application/json
errorstringrequiredWhat went wrong, in a sentence for people.
Request
curl -X POST 'http://localhost:8080/api/wake/key'const res = await fetch("http://localhost:8080/api/wake/key", {
method: "POST",
});
const data = await res.json();
console.log(data);import requests
res = requests.post(
"http://localhost:8080/api/wake/key",
)
print(res.json())Response
{
"key": "8c1f0e7d2b3a4c5d"
}{
"error": "Settings are locked. Unlock with the PIN in Settings."
}