Integrations
Change Discord
PATCH
/api/integrations/discordAdmin. Needs an unlock token (
x-tempolight-token) while a PIN lock is set; without a lock, anyone can call it.A Discord webhook that posts what plays, scene changes and Twitch events.
Request body application/json
webhookstring"" removes it.
usernamestringnowPlayingbooleanscenesbooleantwitchbooleanResponses
200OKapplication/json
object
The Discord 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/discord' \
-H 'content-type: application/json' \
-d '{
"webhook": "https://discord.com/api/webhooks/123/abc",
"nowPlaying": true
}'const res = await fetch("http://localhost:8080/api/integrations/discord", {
method: "PATCH",
headers: { "content-type": "application/json" },
body: JSON.stringify({
"webhook": "https://discord.com/api/webhooks/123/abc",
"nowPlaying": true
}),
});
const data = await res.json();
console.log(data);import requests
res = requests.patch(
"http://localhost:8080/api/integrations/discord",
json={
"webhook": "https://discord.com/api/webhooks/123/abc",
"nowPlaying": True
},
)
print(res.json())Response
{}{
"error": "Paste the webhook address Discord shows (https://discord.com/api/webhooks/…)"
}{
"error": "Settings are locked. Unlock with the PIN in Settings."
}