rezzex Posted June 22, 2016 Report Posted June 22, 2016 Hay, i cant send Tradeoffer's. My Code is: SteamUser.on('webSession', function(sessionID, cookies) { log('Got the WebSession from the login!'); SteamCommunity.setCookies(cookies); // sets the cookies for steamcommunity manager.setCookies(cookies); // sets the cookies for the trade-offer manager manager.parentalUnlock('....'); var offer = manager.createOffer(tradeurl); // create a new offer offer.addTheirItem({"appid": 730, "contextid": 2, "assetid": "6658188534"}); // add a item offer.send(function(err, status) { // send a offer if (err) { // if it fails log(err + ' ' + status, true); } else { console.log("Offer #" + offer.id + " " + status); } }); }); /* TODO: A WAY TO REFRESH SESSIONS */ This gives me the following Error: [2016:06:22-12:59:42] accountname: Error: HTTP error 403 undefined Quote
Dr. McKay Posted June 22, 2016 Report Posted June 22, 2016 Don't call parentalUnlock until the callback of setCookies fires Don't try to send an offer until the callback of parentalUnlock fires Quote
rezzex Posted June 23, 2016 Author Report Posted June 23, 2016 (edited) manager.setCookies(cookies, function (callback) { if(callback) throw callback; manager.parentalUnlock('code', function (callback) { if(callback) throw callback; var offer = manager.createOffer(tradeurl); // create a new offer offer.addTheirItem({"appid": 730, "contextid": 2, "assetid": "6658188534"}); // add a item offer.send(function(err, status) { // send a offer if (err) { // if it fails log(err + ' ' + status, true); } else { console.log("Offer #" + offer.id + " " + status); } }); }); }); // sets the cookies for the trade-offer manager Still gives me a 403 Error: Name.js:69 throw callback; ^ Error: HTTP error 403 at SteamCommunity._checkHttpError (...\node_modules\steamcommunity\components\http.js:96:9) at Request._callback (...\node_modules\steamcommunity\components\http.js:50:61) at Request.self.callback (...\node_modules\request\request.js:200:22) at emitTwo (events.js:87:13) at Request.emit (events.js:172:7) at Request.<anonymous> (...\node_modules\request\request.js:1067:10) at emitOne (events.js:82:20) at Request.emit (events.js:169:7) at Gunzip.<anonymous> (...\node_modules\request\request.js:988:12) at emitNone (events.js:72:20) The Error happens on the first Callback. Edited June 23, 2016 by rezzex Quote
Dr. McKay Posted June 23, 2016 Report Posted June 23, 2016 Hm, there's a bit of a chicken-egg problem here in the module. I'll work on a fix, but for the moment I can only suggest that you disable family view. Quote
rezzex Posted June 24, 2016 Author Report Posted June 24, 2016 Okay, thanks notify me please when you update it! Without Family View its working! Quote
Dr. McKay Posted June 30, 2016 Report Posted June 30, 2016 Update to 2.1.0 and provide your PIN to setCookies and it should work for you. Quote
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.