frej4189 Posted December 17, 2017 Report Share Posted December 17, 2017 As has also been the caseĀ earlier, I am trying to create an automatic steam market seller, however I get error 400 when trying to do so.I have tried multiple ways, ending up trying to use httpRequestPost from the steamcommunity package community.httpRequestPost('https://steamcommunity.com/market/sellitem/', { form: { sessionid: community.getSessionID(), appid: item.appid, contextid: item.contextid, assetid: item.assetid, amount: 1, price: item.price }, headers: { 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'User-Agent': 'Opera/9.80 (X11; Linux i686; Ubuntu/14.10) Presto/2.12.388 Version/12.16', 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8', 'Connection': 'keep-alive', 'Cookie': cookies, 'Host': 'steamcommunity.com', 'Accept-Encoding': 'gzip, deflate', 'Accept-Language': 'en-US,en;q=0.5' }, json: true }, (err, response, json) => { if(err) { console.log(err.toString()); return; } console.log(json); }, "steamcommunity"); This will return error 400, and I have no clue as to why that is, any suggestions? Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted December 17, 2017 Report Share Posted December 17, 2017 When you're doing things on the market, you need to set the Referer header to an expected value. Also, don't manually set any of those other headers either. Quote Link to comment Share on other sites More sharing options...
frej4189 Posted December 17, 2017 Author Report Share Posted December 17, 2017 (edited) I set the referer header, still got the error though - how many of those arguments am I supposed to set?EDIT: Sorry, I specified an invalid price, that was the reason as to why I didn't get it working. Edited December 17, 2017 by frej4189 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.