yoba Posted March 14, 2017 Report Share Posted March 14, 2017 My function: function sendOrder ( logOnOptions, offerLink ) { var client = new SteamUser(); var manager = new TradeOfferManager({ "steam": client, // Polling every 30 seconds is fine since we get notifications from Steam "domain": "example.com", // Our domain is example.com "language": "en" // We want English item descriptions }); var community = new SteamCommunity(); if (fs.existsSync('polldata.json')) { manager.pollData = JSON.parse(fs.readFileSync('polldata.json')); } client.logOn(logOnOptions); client.on('loggedOn', function() { console.log("Logged into Steam"); }); client.on('webSession', function(sessionID, cookies) { manager.setCookies(cookies, function(err) { if (err) { console.log(err); process.exit(1); // Fatal error since we couldn't get our API key return; } console.log("Got API key: " + manager.apiKey); // Get our inventory manager.loadInventory(730, 2, true, function(err, inventory) { if (err) { console.log(err); return; } if (inventory.length == 0) { // Inventory empty console.log("CS:GO inventory is empty"); return; } console.log("Found " + inventory.length + " CS:GO items"); // Create and send the offer var offer = manager.createOffer(offerLink); offer.addMyItems(inventory); offer.setMessage("Here, have some items!"); offer.send(function(err, status) { if (err) { console.log(err); return; } if (status == 'pending') { // We need to confirm it console.log(`Offer #${offer.id} sent, but requires confirmation`); community.acceptConfirmationForObject(logOnOptions.identySecrect, offer.id, function(err) { if (err) { console.log(err); } else { console.log("Offer confirmed"); } }); } else { console.log(`Offer #${offer.id} sent successfully`); } }); }); }); community.setCookies(cookies); }); manager.on('sentOfferChanged', function(offer, oldState) { console.log(`Offer #${offer.id} changed: ${TradeOfferManager.ETradeOfferState[oldState]} -> ${TradeOfferManager.ETradeOfferState[offer.state]}`); }); manager.on('pollData', function(pollData) { fs.writeFile('polldata.json', JSON.stringify(pollData), function() {}); }); } After calling it, I get an error: Logged into SteamError: Access Denied at SteamCommunity.<anonymous> (/Users/code/Documents/node/steam/node_modules/steamcommunity/components/webapi.js:15:20) at Request._callback (/Users/code/Documents/node/steam/node_modules/steamcommunity/components/http.js:67:15) at Request.self.callback (/Users/code/Documents/node/steam/node_modules/request/request.js:188:22) at emitTwo (events.js:106:13) at Request.emit (events.js:191:7) at Request.<anonymous> (/Users/code/Documents/node/steam/node_modules/request/request.js:1171:10) at emitOne (events.js:96:13) at Request.emit (events.js:188:7) at Gunzip.<anonymous> (/Users/code/Documents/node/steam/node_modules/request/request.js:1091:12) at Gunzip.g (events.js:291:16) Please help me Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted March 14, 2017 Report Share Posted March 14, 2017 Your account is most likely limited. You can't use this module with limited Steam accounts. Quote Link to comment Share on other sites More sharing options...
yoba Posted March 15, 2017 Author Report Share Posted March 15, 2017 Your account is most likely limited. You can't use this module with limited Steam accounts.But, if you go through the browser - the trades are working. What is the problem? This limit applies only to the API? Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted March 15, 2017 Report Share Posted March 15, 2017 Yes. Quote Link to comment Share on other sites More sharing options...
yoba Posted March 15, 2017 Author Report Share Posted March 15, 2017 (edited) Tell me please, where can I read about these limits? In more detail Edited March 15, 2017 by yoba Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted March 15, 2017 Report Share Posted March 15, 2017 https://support.steampowered.com/kb_article.php?ref=3330-IAGK-7663 Quote Link to comment Share on other sites More sharing options...
yoba Posted March 16, 2017 Author Report Share Posted March 16, 2017 I checked my account. There are no limitis on this account. But I still get an error: Error: Access Denied Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted March 16, 2017 Report Share Posted March 16, 2017 I suggest you check again. 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.