Integrations
Test Discord
POST
/api/integrations/discord/testAdmin. Needs an unlock token (
x-tempolight-token) while a PIN lock is set; without a lock, anyone can call it.Posts a test message.
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.
502A service Tempolight relies on failed.application/json
errorstringrequiredWhat went wrong, in a sentence for people.
Request
curl -X POST 'http://localhost:8080/api/integrations/discord/test'const res = await fetch("http://localhost:8080/api/integrations/discord/test", {
method: "POST",
});
const data = await res.json();
console.log(data);import requests
res = requests.post(
"http://localhost:8080/api/integrations/discord/test",
)
print(res.json())Response
{
"ok": true
}{
"error": "Paste a Discord webhook address first"
}{
"error": "Settings are locked. Unlock with the PIN in Settings."
}{
"error": "Discord doesn't know this webhook"
}