Warzone API Stopped Working

Asked Jan 8, 2022·6 replies·Last activity 4 years ago·Open in Discord ↗
Archived from the original community forum
Things may have changed since it was written. Still stuck? Ask the community on Discord.

Hi All,

I'm new here so sorry if this isn't the place! I have the below code do display some Warzone KD info which comes from cod.tracker.gg and it's recently stopped working. I've tried to debug it myself but I can't quite figure out the issue. This is a command i use for Twitch through Nightbot. Any help would be greatly appreciated!

$(eval s=$(urlfetch json [https://api.tracker.gg/api/v2/warzone/standard/profile/atvi/Reaz%7644166/).data.segments[1].stats](https://api.tracker.gg/api/v2/warzone/standard/profile/atvi/Reazv44166/).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}%)

The only thing that changed lately was the username, but all the same publicity settings apply. Thanks again

6 replies

Hey @Eager Deer!

Have you changed the username properly? Because the issue isn't the command, but the API link: it can't find you.

Hi Emily i tried your code to check my own stats in chat, and it works perfect, but i was wondering how could i use it to find somebody els in game? like for example a suspicious player just killed me and i want to search him up and check player#12345 by typing !check player#12345

and what would be the command to make atvi the default thing in the command so i dont have to type !stats atvi Curry4k#4888893 and just type !stats Curry4k#4888893

Then you can use a single command, I think this one will do the job properly:

$(eval s=$(urlfetch json https://api.tracker.gg/api/v2/warzone/standard/profile/atvi/$(querystring)).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}`)

Didn't find your answer? The community is on Discord.

Ask on Discord