romatello Posted May 30, 2018 Report Posted May 30, 2018 I've cookies array like this: [ 'sessionid=7030e64a53d6f7860bc69038', 'steamLogin=76561198447561491%7c%7c3B5AF02B12EC2F367974917BC090EB7F0E6B3B91', 'steamLoginSecure=76561198447561491%7c%7c1CC92BDD67243C7E761681E40E3B8419416AA858' ]I get an error "not logged in" when I try to log in trade offer manager through cookies using setCookies method. I take cookies a minute before using setCookies methodCan someone explain why i get an error? Quote
romatello Posted May 30, 2018 Author Report Posted May 30, 2018 var cookies = db_data.cookies.split(","); // cookies in db stored as string var steam_community = new SteamCommunity(); var offer_manager = new TradeOfferManager({ "community": steam_community }); offer_manager.setCookies(cookies, function(err) { if (err) { console.log(err); console.log(cookies); return; } console.log("Got API key: " + offer_manager.apiKey); }); Quote
Dr. McKay Posted May 30, 2018 Report Posted May 30, 2018 Are you using the cookies on the same IP as where they were created? I find generally you have to use the same IP. Quote
romatello Posted May 30, 2018 Author Report Posted May 30, 2018 (edited) for the test, I use two scripts on the same server. first one writes cookies to db, second one tries to log in trade offer manager using cookies. IP is the same. Edited May 30, 2018 by romatello Quote
Dr. McKay Posted May 31, 2018 Report Posted May 31, 2018 I dunno what to tell you. Everything you posted looks good, so you must be doing something wrong elsewhere. 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.