Alright, so I have been looking for this all over the internet, and what I have found out is that when you want to get someones steam inventory you use this:
http://api.steampowered.com/IEconItems_{appid}/GetPlayerItems/v0001/?key={apikey}&steamid={steamid}&format=json
But the problem is that when I do that for CS:GO (appid: 730
), I just get an empty response back, even though the user has items in their inventory.
Ensure that you are logged into the Steam Community Website. Navigate to the Steam API Key Registration Website. Now add a domain name, agree to the terms and click register. If your server doesn't have a valid domain, feel free to input anything here.
API Key Request Enter here and sign in with your Steam Account Name and Password. In the next screen you should fill your Steam Domain Name, confirm the Steam Api Terms of Use check box and click on the “Register” button. If everything went well you should see an screen as bellow with your own Steam Web API Key.
if you want to get the json just use one of the following links:
general steam inventory: ( 1: games, 3: coupons, 6: trading cards, 7: rewards )
http://steamcommunity.com/id/<USERURL>/inventory/json/753/1
http://steamcommunity.com/profiles/<STEAMID>/inventory/json/753/1
http://steamcommunity.com/id/<USERURL>/inventory/json/753/3
http://steamcommunity.com/profiles/<STEAMID>/inventory/json/753/3
http://steamcommunity.com/id/<USERURL>/inventory/json/753/6
http://steamcommunity.com/profiles/<STEAMID>/inventory/json/753/6
http://steamcommunity.com/id/<USERURL>/inventory/json/753/7
http://steamcommunity.com/profiles/<STEAMID>/inventory/json/753/7
games :
http://steamcommunity.com/id/<USERURL>/inventory/json/<APPID>/2
http://steamcommunity.com/profiles/<STEAMID>/inventory/json/<APPID>/2
the problem was not the counter-strike appid, you just used an old link that only works for the general steam inventory. I suggest you using the link using STEAMID because not every steamuser has set a customurl.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With