Steam get user matches for cs:go

2.6k views Asked by At

I'm trying to find a solution for getting user stats from steam for Counter Strike GO. I found a best solution to get user stats from Steam API, but I can't find where to get last user matches, I can get global data, I can get some info of last match played, and it's very well detailed.

This is endpoint to get user details for CS:GO (appid for csgo is 730): https://api.steampowered.com/ISteamUserStats/GetUserStatsForGame/v2/?key=&steamid=<steam_id>&appid=730

And here is what am I getting as response: https://justpaste.it/84bbm

I want to get data like leetify, but I can't find how are they getting last matches and data for that matches. Any ideas?

1

There are 1 answers

0
ehsan parsania On

You can't get user's last message this way

1- you must to get user steam ID , the simplest way to do it is implement "login with steam" , It return you user info , It is a repo that implemented "login with steam"

https://github.com/EhsanParsania/Steam-Auth

2- you must get The Game Authentication Code from user , It allows you to access user's match history

3- you must to send request like this with the parameters that I said

https://api.steampowered.com/ICSGOPlayers_730/GetNextMatchSharingCode/v1?key=XXX&steamid=765XXX&steamidkey=AAAA-AAAAA-AAAA&knowncode=CSGO-ZT42K-Jxxxx-Kxxxx-5xxxx-Oixxx

source :

https://developer.valvesoftware.com/wiki/Counter-Strike:_Global_Offensive_Access_Match_History

** csgostat.gg has done it , you can take a look that how the implemented that.