Asf Posted February 4, 2019 Report Posted February 4, 2019 Hello Error: Must be logged in before trying to do anything with confirmations I get this error when executing code in BAS (Browser Automation Studio) [[IDENTITY_SECRET]] = JSON.parse([[FILE_CONTENT]]).identity_secret var SteamTotp = require('steam-totp'); [[code2]] = SteamTotp.generateConfirmationKey([[IDENTITY_SECRET]]); [[code3]] = SteamTotp.getConfirmationKey([[code2]]); [[TIME]] = SteamTotp.time([[timeOffset]]); var SteamCommunity = require('steamcommunity'); var community = new SteamCommunity(); var Steam = require('steam-client'); var client = new Steam.CMClient(Steam.EConnectionProtocol.TCP); var TradeOfferManager = require('steam-tradeoffer-manager'); var manager = new TradeOfferManager(); client.on('webSession', (sessionID, cookies) => { manager.setCookies(cookies, function (err) { if (err) { logger.error(err) //игнор.прав process.exit(1); } }); community.setCookies(cookies); community.startConfirmationChecker(10000, [[code3]]); }); var time = [[TIME]]; var confKey = [[code3]]; var allowKey = [[code3]]; community.acceptAllConfirmations(time, confKey, allowKey, function(err, confs){ if(err){ res.sendError(err); return; } if(confs == null) confs = []; res.sendSuccess(confs); }); Quote
Dr. McKay Posted February 5, 2019 Report Posted February 5, 2019 That's not how you use steam-client; you're probably looking to use steam-user Don't use community.startConfirmationChecker. Per the docs, no support will be provided for code that uses confirmation polling. Quote
fOrest94 Posted July 26, 2019 Report Posted July 26, 2019 That's not how you use steam-client; you're probably looking to use steam-user Don't use community.startConfirmationChecker. Per the docs, no support will be provided for code that uses confirmation polling. Is it right code? [[IDENTITY_SECRET]] = JSON.parse([[FILE_CONTENT]]).identity_secret var SteamTotp = require('steam-totp'); [[code2]] = SteamTotp.generateConfirmationKey([[IDENTITY_SECRET]]); [[code3]] = SteamTotp.getConfirmationKey([[code2]]); [[TIME]] = SteamTotp.time([[timeOffset]]); var SteamCommunity = require('steamcommunity'); var community = new SteamCommunity(); var Steam = require('steam-user'); var client = new SteamUser(); var TradeOfferManager = require('steam-tradeoffer-manager'); var manager = new TradeOfferManager(); client.on('webSession', (sessionID, cookies) => { manager.setCookies(cookies, function (err) { if (err) { logger.error(err) //игнор.прав process.exit(1); } }); community.setCookies(cookies); community.startConfirmationChecker(10000, [[code3]]); }); var time = [[TIME]]; var confKey = [[code3]]; var allowKey = [[code3]]; community.acceptAllConfirmations(time, confKey, allowKey, function(err, confs){ if(err){ res.sendError(err); return; } if(confs == null) confs = []; res.sendSuccess(confs); }); 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.