Integrations
Sign in to Twitch
POST
/api/integrations/twitch/loginAdmin. Needs an unlock token (
x-tempolight-token) while a PIN lock is set; without a lock, anyone can call it.Starts the device-code sign-in: enter userCode at uri (twitch.tv/activate).
Request body application/json optional
clientIdstringResponses
200OKapplication/json
userCodestringuristringexpiresAtnumber400The 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/login' \
-H 'content-type: application/json' \
-d '{
"clientId": "abcdefghijklmnopqrstuvwxyz0123"
}'const res = await fetch("http://localhost:8080/api/integrations/twitch/login", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
"clientId": "abcdefghijklmnopqrstuvwxyz0123"
}),
});
const data = await res.json();
console.log(data);import requests
res = requests.post(
"http://localhost:8080/api/integrations/twitch/login",
json={
"clientId": "abcdefghijklmnopqrstuvwxyz0123"
},
)
print(res.json())Response
{
"userCode": "ABCD-EFGH",
"uri": "https://www.twitch.tv/activate",
"expiresAt": 1762201800000
}{
"error": "Paste your Twitch application's Client ID first"
}{
"error": "Settings are locked. Unlock with the PIN in Settings."
}