Games
Get the game's config file
GET
/api/integrations/games/{game}/cfgAdmin. Needs an unlock token (
x-tempolight-token) while a PIN lock is set; without a lock, anyone can call it.The game's gamestate_integration_tempolight.cfg, with its token, and the folder it goes in.
Path parameters
gamestringrequiredcs2 or dota2.
Query parameters
urlstringrequiredTempolight's address as the game's computer reaches it.
Responses
200OKapplication/json
filenamestringfolderstringcontentstring400The 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.
404No such id.application/json
errorstringrequiredWhat went wrong, in a sentence for people.
Request
curl 'http://localhost:8080/api/integrations/games/cs2/cfg?url=http%3A%2F%2F127.0.0.1%3A8080'const res = await fetch("http://localhost:8080/api/integrations/games/cs2/cfg?url=http%3A%2F%2F127.0.0.1%3A8080");
const data = await res.json();
console.log(data);import requests
res = requests.get(
"http://localhost:8080/api/integrations/games/cs2/cfg?url=http%3A%2F%2F127.0.0.1%3A8080",
)
print(res.json())Response
{
"filename": "gamestate_integration_tempolight.cfg",
"folder": "game/csgo/cfg",
"content": "\"Tempolight\"\n{\n …\n}\n"
}{
"error": "url is Tempolight's address as the game's computer reaches it, like http://127.0.0.1:8080"
}{
"error": "Settings are locked. Unlock with the PIN in Settings."
}{
"error": "Unknown game"
}