ValveSoftware / csgo-osx-linux

Counter-Strike: Global Offensive
http://counter-strike.net
775 stars 69 forks source link

[PickEm] Unable To Set Pick'Ems Via API #3083

Open nairraghav opened 1 year ago

nairraghav commented 1 year ago

Please describe your issue in as much detail as possible:

I'm currently trying to use to exposed API endpoints to set my Pick'Ems. I was able to find the following documentation which listed out the various supported endpoints: https://developer.valvesoftware.com/wiki/Counter-Strike:_Global_Offensive_PickEm_Fantasy_Management

I was able to gather tournament information to determine the various team ids and the section/group ids. When it comes to uploading the pickem, it is specified that we need to provide an item id as well. In the past, users had to lock up a Sticker to put their vote for a team. This is no longer the current behavior. How do I bypass this requirement? Is there a new/different API/documentation that I should be referring to?

Steps for reproducing this issue:

Refer to documentation: https://developer.valvesoftware.com/wiki/Counter-Strike:_Global_Offensive_PickEm_Fantasy_Management#Placing_Pick.27Em_Challenge_Prediction

  1. Hit the following API: https://api.steampowered.com/ICSGOTournaments_730/UploadTournamentPredictions/v1?key={steam_web_api_key} with the post body: {"event": 20, "steamid": "steam_id", "steamidkey": "rio_authentication_code", "sectionid": section_id, "groupid": group_id "index": 0, "pickid": team_id}
  2. Response: 404 Status Code, Body: {}
Ma-ve commented 1 year ago

You still need the item ID, which is obtained by using ICSGOTournaments_730/GetTournamentItems/v1/: however, locking a pick will not change the itemid, so you may request this once per user and use those itemids indefinitely.