Integrations
Test a Twitch reaction
POST
/api/integrations/twitch/testAdmin. Needs an unlock token (
x-tempolight-token) while a PIN lock is set; without a lock, anyone can call it.Runs that event's reaction, as if it happened.
Request body application/json
kindstringrequiredOne of
"follow" "subscribe" "resub" "gift" "raid" "cheer"Responses
200OKapplication/json
oktruerequired400The 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 POST 'http://localhost:8080/api/integrations/twitch/test' \
-H 'content-type: application/json' \
-d '{
"kind": "raid"
}'const res = await fetch("http://localhost:8080/api/integrations/twitch/test", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
"kind": "raid"
}),
});
const data = await res.json();
console.log(data);import requests
res = requests.post(
"http://localhost:8080/api/integrations/twitch/test",
json={
"kind": "raid"
},
)
print(res.json())Response
{
"ok": true
}{
"error": "kind is follow, subscribe, resub, gift, raid or cheer"
}{
"error": "Settings are locked. Unlock with the PIN in Settings."
}