Games
Make a new game token
POST
/api/integrations/games/{game}/tokenAdmin. Needs an unlock token (
x-tempolight-token) while a PIN lock is set; without a lock, anyone can call it.A new token: the installed config file stops working until it is downloaded again.
Path parameters
gamestringrequiredcs2 or dota2.
Responses
200OKapplication/json
tokenstring403Locked, or not allowed.application/json
errorstringrequiredWhat went wrong, in a sentence for people.
404No such id.application/json
errorstringrequiredWhat went wrong, in a sentence for people.
Request
curl -X POST 'http://localhost:8080/api/integrations/games/cs2/token'const res = await fetch("http://localhost:8080/api/integrations/games/cs2/token", {
method: "POST",
});
const data = await res.json();
console.log(data);import requests
res = requests.post(
"http://localhost:8080/api/integrations/games/cs2/token",
)
print(res.json())Response
{
"token": "9f8e7d6c5b4a39281706f5e4d3c2b1a0"
}{
"error": "Settings are locked. Unlock with the PIN in Settings."
}{
"error": "Unknown game"
}