inner_psycho Posted July 4, 2016 Report Posted July 4, 2016 Hi guys! I have a problem when i get callback on webSession event, few days ago everything works fine, but now when i try to execute my node js file and got message from my logger: Unable to set trade offer cookies: Error: HTTP error 429. What can be wrong? So trade offer manager sent too many requests to steam and after 5-7 seconds we have 429. client.on('webSession', function (sessionID, cookies) { client.setPersona(SteamUser.Steam.EPersonaState.Online); offers.setCookies(cookies, function (err){ if (err) { logger.error('Unable to set trade offer cookies: '+err); process.exit(1); } }); }); In cookies i receive an array with next data: sessionid, steamLogin and steamLoginSecure. Any idea? Quote
Dr. McKay Posted July 5, 2016 Report Posted July 5, 2016 429 means that you've sent too many requests to Steam in a short time and you need to slow down. Quote
inner_psycho Posted July 5, 2016 Author Report Posted July 5, 2016 429 means that you've sent too many requests to Steam in a short time and you need to slow down.Yeah, i know it. But how can i do it? I just use method of steam trade offer manager 'setCookies' inside webSession event and this method gives me too many requests error. As i know this method don't have additional arguments to slow down his requests. And as i said before few days ago everything works fine. Usually it takes milliseconds to set cookies. Quote
Dr. McKay Posted July 5, 2016 Report Posted July 5, 2016 setCookies makes exactly one request (two if you supply a Family View PIN). It isn't setCookies' fault. You're making requests elsewhere too quickly. Quote
inner_psycho Posted July 5, 2016 Author Report Posted July 5, 2016 Ok, here is my code, i cut it and try to test, but still the same error. Please look at it, mb you will have any idea about what going wrong. let SteamUser = require('steam-user'); let TradeOfferManager = require('steam-tradeoffer-manager'); let config = require('./config.js'); //my config files here with username, password and other stuff let totp = require('steam-totp'); function getAuthCode() { return totp.getAuthCode('mystuffhere'); } let client = new SteamUser(); let offers = new TradeOfferManager({ steam: client, domain: config.domain, language: "en", pollInterval: 10000, cancelTime: 300000 }); client.logOn({ accountName: config.username, password: config.password, twoFactorCode: getAuthCode() }); client.on('loggedOn', function (details) { console.log("Logged into Steam as " + client.steamID.getSteam3RenderedID()); }); client.on('error', function (e) { console.log(e); process.exit(1); }); client.on('webSession', function (sessionID, cookies) { console.log("Got web session"); client.setPersona(SteamUser.Steam.EPersonaState.Online); offers.setCookies(cookies, function (err){ if (err) { console.log('Unable to set trade offer cookies: '+err); process.exit(1); } console.log("Cookies set. API Key: "+offers.apiKey); }); }); Quote
Dr. McKay Posted July 5, 2016 Report Posted July 5, 2016 There's nothing in there that would spam requests. Note that it's an IP limit. It can be anything on your IP that is spamming requests. Quote
inner_psycho Posted July 5, 2016 Author Report Posted July 5, 2016 (edited) Ok, thanks, i'll try to figure out what can it be. Edited July 5, 2016 by inner_psycho 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.