evb Posted September 15, 2016 Report Posted September 15, 2016 Hi,I wrote my own library that interacts with Steam servers.My version of getConfirmations works fine with one bot. It runs periodically every 10 seconds with no issues.Today, I hooked it up with six bots running simultaneously. This is where errors 429 (too many requests) start happening.Seems like steamcommunity.com/mobileconf/conf has a rate limit: 6 requests per minute from the same IP.Am I right? Quote
Dr. McKay Posted September 15, 2016 Report Posted September 15, 2016 429 does indeed mean that you're being rate-limited, yes. Quote
evb Posted September 15, 2016 Author Report Posted September 15, 2016 Can you please confirm that your library has the very same limitations? (6 requests per minute per IP address) Quote
Dr. McKay Posted September 15, 2016 Report Posted September 15, 2016 "My library" doesn't have limitations, Steam servers impose limitations. They're not exactly published. If you're getting 429, then you're hitting it. Quote
evb Posted September 23, 2016 Author Report Posted September 23, 2016 Here's a little demo just in case anybody else curious about rate limits. 'use strict'; const SteamCommunity = require('steamcommunity'), SteamTotp = require('steam-totp'), COMMUNITY = new SteamCommunity(); const USERNAME = '...', PASSWORD = '...', SHARED_SECRET = '...', IDENTITY_SECRET = '...', CODE = SteamTotp.getAuthCode(SHARED_SECRET), INTERVAL = 5000; COMMUNITY.login({ accountName: USERNAME, password: PASSWORD, twoFactorCode: CODE }, function(err, sessionID, cookies, steamguard, oAuthToken){ if (err) { console.log('login ERROR:', err); return; } COMMUNITY.setCookies(cookies); let n = 0; const onInterval = function () { n += 1; const time = Math.round(Date.now() / 1000); const key = SteamTotp.getConfirmationKey(IDENTITY_SECRET, time, 'conf'); COMMUNITY.getConfirmations(time, key, function (err, confirmations) { if (err) { console.log(`${n}: getConfirmations ERROR:`, err); return; } console.log(`${n}: getConfirmations OK`); }); }; setInterval(onInterval, INTERVAL); }); INTERVAL === 10000 1: getConfirmations OK 2: getConfirmations OK 3: getConfirmations OK 4: getConfirmations OK 5: getConfirmations OK 6: getConfirmations OK 7: getConfirmations OK 8: getConfirmations OK 9: getConfirmations OK INTERVAL === 5000 1: getConfirmations OK 2: getConfirmations OK 3: getConfirmations OK 4: getConfirmations OK 5: getConfirmations OK 6: getConfirmations OK 7: getConfirmations ERROR: { [Error: HTTP error 429] code: 429 } 8: getConfirmations ERROR: { [Error: HTTP error 429] code: 429 } 9: getConfirmations ERROR: { [Error: HTTP error 429] code: 429 } 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.