OnlyOnePro 2022 年 10 月 31 日 上午 5:05
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.
< >
目前顯示第 1-8 則留言,共 8
MalikQayum 2022 年 10 月 31 日 上午 5:09 
which api interface and method are you trying to make a request to.
also link to the 2 steamids you have tested with.
最後修改者:MalikQayum; 2022 年 10 月 31 日 上午 5:10
OnlyOnePro 2022 年 10 月 31 日 上午 6:12 
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 2022 年 10 月 31 日 上午 6:24 
引用自 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 2022 年 10 月 31 日 上午 8:53 
start by ignoring snakub, this clearly is above his understanding.

引用自 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.
最後修改者:MalikQayum; 2022 年 10 月 31 日 上午 10:29
OnlyOnePro 2022 年 10 月 31 日 上午 10:18 
引用自 MalikQayum
start by ignoring snakub, this clearly is above his understanding.

引用自 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 2022 年 10 月 31 日 上午 10:23 
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."};
最後修改者:MalikQayum; 2022 年 10 月 31 日 上午 10:25
MalikQayum 2022 年 10 月 31 日 上午 10:41 
引用自 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 2022 年 10 月 31 日 下午 12:25 
引用自 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!
< >
目前顯示第 1-8 則留言,共 8
每頁顯示: 1530 50

張貼日期: 2022 年 10 月 31 日 上午 5:05
回覆: 8