OnlyOnePro Oct 31, 2022 @ 5:05am
Steam Web API returns 500 getting stats for CS:GO
Trying to get the stats for my own account using the Web API key for the CS:GO application returns a 500 error consistently. But when I try with another friend's account it returns a 500 with "Unknown problem determining WebApi request destination." and with another friend's account returns the correct stats.
This is way too unpredictable for me to use, I wanted to create a native CS:GO tracker (like csgostats or leetify), but since the steam request doesn't returns anything and doesn't seems to be a code-side issue, I'm left with a problem that I cannot fix no matter what I can do.

Does anybody on here knows what could be happening, and in the case of a miracle happens and a Valve PM notices this, please fix the API; Web APIs are the standard that everybody agrees to communicate upon in the open network and a non-predictable API with poor documentation is near to unusable.
< >
Showing 1-8 of 8 comments
MalikQayum Oct 31, 2022 @ 5:09am 
which api interface and method are you trying to make a request to.
also link to the 2 steamids you have tested with.
Last edited by MalikQayum; Oct 31, 2022 @ 5:10am
OnlyOnePro Oct 31, 2022 @ 6:12am 
I'm trying to do a GET request to "https://api.steampowered.com/ISteamUserStats/GetUserStatsForGame/v2/?key={_apiKey}&appid=730&steamid={_steamId}"

The SteamIds I tested were 76561198329558049 (for the 500 without message), 258755451235456 (for the 500 with a message). I don't have in hand anymore what friend of mine gave the 200 with the stats.
OnlyOnePro Oct 31, 2022 @ 6:24am 
Originally posted by Snakub Plissken:
500 is a sever side error. Which you cannot fix unless you manage the server. Valve probably has error logging and CS is a popular game so there's probably no way they're unaware of an issue. Being being aware of an issue doesn't mean there's an instance fix. Depends on what the cause is, which is unknown to us.

You'll just have to wait and try again later.
I hope they do because that is exactly what happens. But doing a quick google search it appears to be a repeatable issue and in Stakoverflow there is a lot of complaints due to this same issue. At first I thought it was a HttpClient related error (like bad URI formatting or something like it), but testing with other Ids revealed that the error was 100% on the server side.
MalikQayum Oct 31, 2022 @ 8:53am 
start by ignoring snakub, this clearly is above his understanding.

Originally posted by OnlyOnePro:
I'm trying to do a GET request to "https://api.steampowered.com/ISteamUserStats/GetUserStatsForGame/v2/?key={_apiKey}&appid=730&steamid={_steamId}"

The SteamIds I tested were 76561198329558049 (for the 500 without message), 258755451235456 (for the 500 with a message). I don't have in hand anymore what friend of mine gave the 200 with the stats.

EDIT: since it notice this was your steamid:
the first steamid: 76561198329558049, you have set your game details to private.
this might be a bug, valve hasn't thought of so it throws a 500 internal server error.


258755451235456 this is not a valid steamid. the steam id is a 64 bit.
it starts with 7 and has 17 digits.
"Unknown problem determining WebApi request destination."

basically means the steamid is malformed.
Last edited by MalikQayum; Oct 31, 2022 @ 10:29am
OnlyOnePro Oct 31, 2022 @ 10:18am 
Originally posted by MalikQayum:
start by ignoring snakub, this clearly is above his understanding.

Originally posted by OnlyOnePro:
I'm trying to do a GET request to "https://api.steampowered.com/ISteamUserStats/GetUserStatsForGame/v2/?key={_apiKey}&appid=730&steamid={_steamId}"

The SteamIds I tested were 76561198329558049 (for the 500 without message), 258755451235456 (for the 500 with a message). I don't have in hand anymore what friend of mine gave the 200 with the stats.

EDIT: since it notice this was your steamid:
the first steamid: 76561198329558049, you have set your game details to private.
this might be a bug, valve hasn't thought of so it throws a 500 internal server error.


258755451235456 this is not a valid steamid. the steam id is a 64 bit.
it starts with 7 and has 17 digits.
"Unknown problem determining WebApi request destination."

basically means the steamidis malformed.
With the information you provided is actually the last part. My profile is on public but the game stats is in private; so I needed to make that one part public and It worked!

The wrong Id I kid you not, it is actually a friend's profile (https://steamcommunity.com/id/258755451235456/), and that is his actual steam Id. What happened there I don't know.
MalikQayum Oct 31, 2022 @ 10:23am 
258755451235456 is his vanity name (custom url), you would need to resolve his vanity name inorder to fetch his steamid.

either use a site like this:
https://steamdb.info/calculator/76561198855312368/

76561198855312368 is his steamid.

or get the id from the html source:

g_rgProfileData = {"url":"https://steamcommunity.com/id/258755451235456/","steamid":"76561198855312368","personaname":"TACO BOI","summary":"No information given."};
Last edited by MalikQayum; Oct 31, 2022 @ 10:25am
MalikQayum Oct 31, 2022 @ 10:41am 
Originally posted by Snakub Plissken:
Yes, I didn't account for users throwing bad data at the API. Bad data can certainly lead to a server 500 error, since it can't be processed.

Of course garbage in, garbage out applies in this case.
don't pretend to know what you are talking about, it is awkward.. just leave this to the ones that can actually provide help.
OnlyOnePro Oct 31, 2022 @ 12:25pm 
Originally posted by MalikQayum:
258755451235456 is his vanity name (custom url), you would need to resolve his vanity name inorder to fetch his steamid.

either use a site like this:
https://steamdb.info/calculator/76561198855312368/

76561198855312368 is his steamid.

or get the id from the html source:

g_rgProfileData = {"url":"https://steamcommunity.com/id/258755451235456/","steamid":"76561198855312368","personaname":"TACO BOI","summary":"No information given."};
Ohhh, so he entered a random numeric thingy for his steam ID? ♥♥♥♥ that got me. Using the resolved ID worked! Thanks you so much!
< >
Showing 1-8 of 8 comments
Per page: 1530 50

Date Posted: Oct 31, 2022 @ 5:05am
Posts: 8