Integrations
Change Twitch
PATCH
/api/integrations/twitchAdmin. Needs an unlock token (
x-tempolight-token) while a PIN lock is set; without a lock, anyone can call it.Chat commands (scene, effect, flash, colour, strobe, drop) and reactions to follows, subs, raids and cheers.
Request body application/json
chatobject{enabled, channel, prefix, who, cooldownSec, userCooldownSec, commands, scenes, effects}.
clientIdstringeventsOnbooleantargetstringeventsobjectA reaction per event: follow, subscribe, resub, gift, raid, cheer.
Responses
200OKapplication/json
object
The Twitch settings and status.
400The body isn't valid JSON, or a value is wrong.application/json
errorstringrequiredWhat went wrong, in a sentence for people.
403Locked, or not allowed.application/json
errorstringrequiredWhat went wrong, in a sentence for people.
Request
curl -X PATCH 'http://localhost:8080/api/integrations/twitch' \
-H 'content-type: application/json' \
-d '{
"chat": {
"enabled": true,
"channel": "mychannel",
"prefix": "!"
}
}'const res = await fetch("http://localhost:8080/api/integrations/twitch", {
method: "PATCH",
headers: { "content-type": "application/json" },
body: JSON.stringify({
"chat": {
"enabled": true,
"channel": "mychannel",
"prefix": "!"
}
}),
});
const data = await res.json();
console.log(data);import requests
res = requests.patch(
"http://localhost:8080/api/integrations/twitch",
json={
"chat": {
"enabled": True,
"channel": "mychannel",
"prefix": "!"
}
},
)
print(res.json())Response
{}{
"error": "A Twitch channel name is 3 to 25 letters, digits or _"
}{
"error": "Settings are locked. Unlock with the PIN in Settings."
}