[Bug] Filtering by AppIds in PlayerService.GetOwnedGamesAsync is not working
paprik opened this issue · 4 comments
According to the Steam Web API documentation for GetOwnedGames
, the App Ids cannot be passed as URL parameters and need to be given in JSON format.
If I looked correctly in SteamWebRequest.BuildRequestCommand
, all parameters are currently translated into URL parameters.
I tried to implement this, but I only get 500 Internal Server Error responses.
Here's an example (with key removed):
https://api.steampowered.com/IPlayerService/GetOwnedGames/v1/?key=&include_played_Free_games=1&steamid=76561197960361544&include_appinfo=1&format=json&input_json=%7B%22appids_filter%22%3A%5B10%2C20%2C30%5D%7D
Also noticed someone else talking about this issue years ago: https://developer.valvesoftware.com/wiki/Steam_Web_API/Feedback#JSON_input_does_not_work
I think you have to put all the parameters in the JSON when you use the format, as in:
{ "steamid":76561197960361544, "appids_filter":[10,20,30] }
For example this works (key removed):
https://api.steampowered.com/IPlayerService/GetOwnedGames/v1/?key=XXXXX&format=json&input_json=%7B%0D%0A%22steamid%22%3A76561197960361544%2C%0D%0A%22appids_filter%22%3A%5B10%2C20%2C30%5D%0D%0A%7D
Hey thanks. That worked!
Fixed on commit afbc218.