Hi Doc, Hi all
I have that problem that every time my bot works for some few hours it's got 403 and i need to restart my bot
This is how I log in.
Did I do something wrong? Am I missing something?
const client = new SteamUser();
const community = new SteamCommunity();
const manager = new TradeOfferManager({
steam: client,
community: community,
useAccessToken: true,
language: 'en',
pollInterval: 30000,
cancelTime: 30 * 59 * 1000
});
const logInOptions = {
accountName: config.accountName,
password: config.password,
autoRelogin: true,
twoFactorCode: SteamTotp.generateAuthCode(config.sharedSecret),
};
client.logOn(logInOptions);
client.on('loggedOn', () => {
console.log('Logged on');
client.setPersona(SteamUser.EPersonaState.Online);
client.gamesPlayed([730]); // CS:GO game ID
});
client.on('webSession', (sid, cookies) => {
manager.setCookies(cookies);
community.setCookies(cookies);
handleWebSession();
setInterval(handleWebSession, 15000);
});