STEAM GROUP
barter.vg bartervg
STEAM GROUP
barter.vg bartervg
428
IN-GAME
2,126
ONLINE
Founded
November 25, 2014
All Discussions > Help & Bugs > Topic Details
Milouze Apr 11, 2017 @ 2:30am
Help: Command to add game to library ?
http://store.steampowered.com/app/567090/

This is the first I see a game refusing to be added to my library when clicking on "Play Game" from a browser.

If you guys could help me use the proper command or trick, that would save my day.
This is for a friend who's trying to grab the game before it's no longer free.
< >
Showing 1-6 of 6 comments
theemu Apr 11, 2017 @ 2:49am 
inside Steam client, go to that game's store page http://store.steampowered.com/app/567090/ and clicking "Play Game" button there is not an option? If it asks you to install, you know that the license for the game has been claimed to your account.
Last edited by theemu; Apr 11, 2017 @ 2:53am
Milouze Apr 11, 2017 @ 3:47am 
Thanks but the idea is to do it from a browser, on a pc that does not have the steam client installed.
I've been able to do it from even a mobile in similar cases, hence my surprise on this one :(
Ryuga Apr 11, 2017 @ 4:38am 
As I understand it, some games are simply "free", they have no license and they are listed as a free download (it is the case with most MMOs). Others have "free licenses" that you activate on your account when clicking "play game".
Looks like this game falls under the first case.
theemu Apr 11, 2017 @ 7:53am 
steamdb does not help either. the link there is the same as in Steam Store:
steam://install/567090
clicking that does not do anything unless you have Steam client running and you are signed in.

---

In order to be able to claim free license via webbrowser session, you need to execute API command such as https://store.steampowered.com/api/addtowishlist/

and there is this one for adding free licenses: https://store.steampowered.com/checkout/addfreelicense/

note: You can't add apps to your account, you need to find the ID number of the subscription license package of the app you want to add. It's easy to do at steamdb: Here's link to the free SubID of app 567090: https://steamdb.info/sub/143378/

1. have any store.steampowered.com page open + make sure u are signed in
2. open devtools in your webbrowser
3. then in console tab: copypaste and try executing the following script:
var subid=143378; //free license for app 567090 "8-Bit Bayonetta" $J.post('https://store.steampowered.com/checkout/addfreelicense/'+subid,{ type:'POST', data:{sessionid:g_sessionID,'ajax':true}, complete:function(){}, success:function(data){ alert('SubID'+subid+' has been added to your account. It should be now available in your Steam Library.'); }, error:function(data){ if(data&&data.purchaseresultdetail==9) alert('This product is already available in your Steam library'); else alert('There was a problem adding this product to your account.Please try again later'); } });
I can't guarantee the script works as is because I haven't used it in long time myself and Valve might have made changes, but I'm sure we can eventually figure out how to make it work if it's broken.

another slightly different version:
var subid=143378; //free license for app 567090 "8-Bit Bayonetta" $J.post('https://store.steampowered.com/checkout/addfreelicense/'+subid,{ type:'POST', data:{action:'add_to_cart',sessionid:g_sessionID,subid:subid}, complete:function(){}, success:function(data){ alert('SubID'+subid+' has been added to your account. It should be now available in your Steam Library.'); }, error:function(data){ if(data&&data.purchaseresultdetail==9) alert('This product is already available in your Steam library'); else alert('There was a problem adding this product to your account.Please try again later'); } });
Last edited by theemu; Apr 12, 2017 @ 12:56pm
Milouze Apr 11, 2017 @ 8:37am 
Thank you very much for your help, will forward this information for him to try :woodlehappy:
theemu Apr 12, 2017 @ 12:48pm 
has anyone tried,
does either version of the script work?
Last edited by theemu; Apr 12, 2017 @ 12:48pm
< >
Showing 1-6 of 6 comments
Per page: 1530 50

All Discussions > Help & Bugs > Topic Details