daltonv297
daltonv297

Reputation: 161

Steam Web API Key not working

I'm trying to use the GetAssetPrices method of the Steam web API in a java program to find steam community market prices (specifically for the game Counter-Strike: Global Offensive). To figure out how it works in the first place, I just put the url in my web browser before I put it in actual code, but it's rejecting my API key. This is the url:

http://api.steampowered.com/ISteamEconomy/GetAssetPrices/v0001/?appid=440/?key=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&format=xml

The X's are where my api key is, but I get this error:

Forbidden

Access is denied. Retrying will not help. Please verify your
key=
parameter.

Is there something I'm missing? Or is this even possible in the first place? I'm getting my info from here: https://wiki.teamfortress.com/wiki/WebAPI/GetAssetPrices

Anyone who knows anything about the Steam API, please help.

Upvotes: 3

Views: 8108

Answers (1)

Andy
Andy

Reputation: 50570

Your URL is incorrectly formed. The /? you have before key should be &

Change

http://api.steampowered.com/ISteamEconomy/GetAssetPrices/v0001/?appid=440/?key=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&format=xml
                                                                         ^^ --- Should be "&"

to

http://api.steampowered.com/ISteamEconomy/GetAssetPrices/v0001/?appid=440&key=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&format=xml

Upvotes: 8

Related Questions