Warzone API Stopped Working

Hi all,
I’m having troubles dealing with the API for warzone as its suddenly stops working these last days. Note that nothing in the user information have changed (so maybe is a general problem of the API?). The command that I’ve used is the next one:

$(eval s=$(urlfetch json https://api.tracker.gg/api/v2/warzone/standard/profile/atvi/Rivotr1l%236767006/).data.segments[1].stats 12.data.segments%5B1%5D.stats); r=s.kdRatio.value; k=s.kills.value; d=s.deaths.value; w=s.wins.value; dw=s.downs.value; whp=s.weeklyHeadshotPct.value; wk=s.weeklyKdRatio.displayValue; $(channel) has: Wins: ${w} | Kills: ${k} | Downs: ${dw} | Deaths: ${d} | KD: ${r} | Weekly KD: ${wk} | Weekly Headshot: ${whp}%)

Thank you in advance,

Hey @tomizera!

It’s possible the API on the website had outages, and therefore it may temporarily stop working.
However, if it stopped working consistently, then that’s another issue, because I have access to the API and it’s working just fine, so it’s possible the issue is with your command code.
There’s a part I don’t understand in what you shared, and this may be due to the fact that you simply shared it without formatting, so I’m suggesting to re-share the command, and this time to format it as code, you can do so by either putting three backticks before and after your code, or after four spaces on a new line preceded by an empty line:

like this

    or like that

Hey Emily,
Actually checking further I think it’s not a problem related to the API as the API website displays the JSON code properly (see link below) but when using the command in the chat I keep getting a “Unexpected Identifier” error. Hope it’s more clear now, thank you for your support!

Link to the JSON of the API

$(eval s=$(urlfetch json https://api.tracker.gg/api/v2/warzone/standard/profile/atvi/Rivotr1l%236767006).data.segments[0].stats; r=s.kdRatio.value; k=s.kills.value; d=s.deaths.value; w=s.wins.value; `Wins: ${w} | Kills: ${k} | Deaths: ${d} | Kills/Deaths Ratio: ${r}`)

Yup, so I just checked and the server returns a 403, so that’s likely that they blocked requests coming from Nightbot, there’s nothing we can do to change or fix that. Sorry, the command is dead.

They have an alternative way to get the data out of the website: you need to create an account, an app, and maintain an authentication token, but Warzone isn’t an available option (yet?).

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.