Jump to content
McKay Development

Search the Community

Showing results for tags 'node-steamcommunity'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News & Announcements
    • Releases & Updates
  • Help & Support
    • General
    • Guides
    • node-steam-user
    • node-steamcommunity
    • node-steam-tradeoffer-manager
    • node-steam-session

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Skype


Location


Interests

  1. Hi, I am using node-steamcommunity to login and then pass the cookies to node-steam-tradeoffer-manager. Whenever session expires, I relogin and pass the cookies to tradeoffer manager: community.on('sessionExpired', function(err) { community.login(logOnOptions,function(err,sessionID,cookies,steamguard) { if(err) { connectRetry-=1; if(connectRetry==0) { connectRetry=5; setTimeout(function(){logger.info("Couldn't reach server, will log in after 30 min");logIn();},1000*60*30); // try again after 30 minutes } } fs.writeFile(homeDir+'data/steamguard.txt', steamguard); logger.info("Logged into Steam"); connectRetry=5; //use steamcommunity cookies for tradeoffer-manager manager.setCookies(cookies, function(err) { if (err) { logger.error(err); process.exit(1); return; } logger.info("Got API key: " + manager.apiKey); }); community.chatLogon(); //Log on to the chat so that bot appears online community.startConfirmationChecker(10000,secrets.identity_secret); //poll every 10 seconds and confirm }); }); Sometimes I get the following error: info: Logged into Steam C:\MyData\education\NodeJsTutorial\steam-trade-bot\node_modules\steamcommunity\index.js:212 cookies.forEach(function(cookie) { ^ TypeError: Cannot read property 'forEach' of undefined at SteamCommunity.setCookies (C:\MyData\education\NodeJsTutorial\steam-trade-bot\node_modules\steamcommunity\index.js:212:9) at TradeOfferManager.setCookies (C:\MyData\education\NodeJsTutorial\steam-trade-bot\node_modules\steam-tradeoffer-manager\lib\index.js:80:18) at C:\MyData\education\NodeJsTutorial\steam-trade-bot\tradingBot.js:344:11 at SteamCommunity.<anonymous> (C:\MyData\education\NodeJsTutorial\steam-trade-bot\node_modules\steamcommunity\index.js:128:5) at Request._callback (C:\MyData\education\NodeJsTutorial\steam-trade-bot\node_modules\steamcommunity\components\http.js:62:14) at Request.self.callback (C:\MyData\education\NodeJsTutorial\steam-trade-bot\node_modules\steamcommunity\node_modules\request\request.js:200:22) at emitTwo (events.js:87:13) at Request.emit (events.js:172:7) at Request.<anonymous> (C:\MyData\education\NodeJsTutorial\steam-trade-bot\node_modules\steamcommunity\node_modules\request\request.js:1067:10) at emitOne (events.js:82:20) The error is coming on the line manager.setCookies(). Am I handling it in the wrong way or is this some bug? Thanks & Regards, Bheem
  2. Or do I have to remove it from that device and set it up via the bot like this: community.enableTwoFactor(function(err, response) { console.log(response); // So the shared secret, revocation code and the identity secret are in the response. How am I able to save it in a file instead of logging it and then saving it in a file? }); I hope there is a way of not having to remove my current device. My old phone broke so I have been waiting all week to be able to trade again since I linked my new phone.. x)
  3. The 1st server is getting logged out if logging in with the same acc from another IP/serv. Possible fix? And another thing How to pass rememberPassword:true for login(details, callback)?
  4. Hi, I apologize if this question is not relevant as I am fairly new to Openshift and development of steam bots. I have used steamcommunity to develop a trading bot which handles incoming trade offers. I want to host it on Openshift and am following the firepowered tutorial (http://firepowered.org/developer/hosting-a-steam-bot-on-openshift-online/). SteamCommunity saves a steamguard.txt file on login in the directory where the code is present. Is it possible to use it on Openshift as it needs data to be on the data directory referred by env variable OPENSHIFT_DATA_DIR? Thank you. Regards, Bheem
  5. Hello, I would like to know if i am doing something wrong here. I am trying to set up the node-steamcommunity to confirm the trade offers i've send. But it gives no error message whatsoever. I am listening for both events listed in the documentation here https://github.com/DoctorMcKay/node-steamcommunity/wiki/Steam-Confirmation-Polling#startconfirmationcheckerpollinterval-identitysecret but it never goes in any of them. Thank you in advance.
  6. Hello Dr, sometimes im living a http problem. For this problems, i want to request http, how its gonna be? And one more question, how can bot accept all friend requests?
  7. Hey all!, I have pasted my whole script below but please only pay attention to the confirmMobile(userSteamId, callback) function because it is the function that isn't working for me. My main problem (as the title suggests) is that the getConfirmations method only picks up trade offers that I have sent through steamcommunity. Any trade offers that I send through node do not come up. If there is anything that I did wrong please tell me as I have no idea what is wrong with the confirmMobile(userSteamId, callback) function. Any help is greatly appreciated!! var SteamTradeOffers = require('steam-tradeoffers'); var SteamCommunity = require('steamcommunity'); var SteamTotp = require('steam-totp'); var offers = new SteamTradeOffers(); var community = new SteamCommunity(); function confirmMobile(userSteamId, callback) { //This function is called after the trade offer is sent, please look at this function var unixTime = SteamTotp.time(); var confirmationKey = SteamTotp.getConfirmationKey("IDENTITYSECRET", unixTime, "conf"); community.getConfirmations(unixTime, confirmationKey, (err, confirmations) => { if (err) { callback(err); } else { console.log(confirmations); callback(null); } }); } function runBot(userSteamId, skinArray, callback) { // This function makes a trade offer, console.log(typeof userSteamId); if (!userSteamId || !skinArray) { callback(new Error("500error")); } else if (skinArray.length === 0) { callback(new Error("500error")) } else { var sendSkinArray = []; console.log("Skin array 8is: " + skinArray); for (var i = 0;i<skinArray.length;i++) { sendSkinArray.push({ appid: 730, contextid: 2, amount: 1, assetid: String(skinArray[i]) }); if (i === (skinArray.length -1)) { offers.makeOffer({ partnerSteamId: userSteamId, itemsFromMe: sendSkinArray, itemsFromThem: [], message: "Hey! This is the CSGO ACORN bot" },(err, response) => { if (err) { //If cookies have expired, then get new cookies from steamcommunity.com community.login({ "accountName":"USERNAME", "password":"PASSWORD", "twoFactorCode": SteamTotp.generateAuthCode("SHAREDSECRET") },(loginError, sessionID, cookies, steamguard) => { if (loginError) { console.log("err when trying to log inHELLOWO"); callback(new Error("500error")); } else { community.loggedIn((communityError, loggedIn) => { if (communityError) { console.log("err2 was: " + communityError); callback(new Error("loginFailed")); } else { if (loggedIn) { offers.setup({ sessionID:sessionID, webCookie:cookies, APIKey: "SHAREDSECRET", }); runBot(userSteamId, skinArray, callback); } else { callback(new Error("loginFailed")) } } }); } }); } else { console.log(response); confirmMobile(userSteamId, (err, data) => { if (err) { callback(err); } else { callback(null); } }); } }); } } } } community.login({ "accountName":"USERNAME", "password":"PASSWORD", "twoFactorCode": SteamTotp.generateAuthCode("SHAREDSECRET") },(loginError, sessionID, cookies, steamguard) => { if (loginError) { console.log(loginError); } else { community.loggedIn((communityError, loggedIn) => { if (communityError) { console.log("err2 was: " + communityError); } else { if (loggedIn) { offers.setup({ sessionID:sessionID, webCookie:cookies, APIKey: "APIKEY", }); runBot("USERSTEAMID", ["SKINASSETID"], (err) => { if (err) { console.log("There was an error"); } else { console.log("It worked!"); } }); } else { console.log("Could not log in"); } } }); } });
  8. I'm living this, but when i login to my bot not giving any error. What is the problem? My codes is just doing, login, getting cookies, getting api key, editing profile and changing status. Where is the bad thing? If you want i can post the codes.
  9. Hello, i'm trying to do a simple login method using steam-community. The bot has 2FA enabled with a mobile device. I use the following code: var SteamCommunity = require('steamcommunity'); var steam = new SteamCommunity(); var SteamTotp = require('steam-totp'); var logOnOptions = { accountName: "accUsername", password: "accPassword", twoFactorCode: SteamTotp.generateAuthCode("mySharedSecret") }; steam.login(logOnOptions, function(err, sessionID, cookies, steamguard){ if (err) { console.log("There was an error logging in! Error details: " + err.message); process.exit(1); //terminates program } else { console.log("Successfully logged in as " + logOnOptions.accountName); steam.chatLogon(); manager.setCookies(cookies, function(err) { if (err) { console.log(err); process.exit(1); } }); } }); Well the problem is that when i'm trying to login with this code, console returns me Error: SteamGuardMobile, and as the documentation says this error means If your login failed due to Steam Guard and the user has app-based authentication enabled, the message property will be SteamGuardMobile. Login again and provide the app code as twoFactorCode to the details object. But the funny fact is I'm using the twoFactorCode on the details object, and my sharedsecret is correct. Why I'm having this issue? Thanks a lot
  10. Hello, Bot did send trades, but steam was down and bot didn't confirm them Later, when steam cames back, how to confirm all that trades?
  11. Hi guys, can you tell me what exactly following errors means? I get them in sessionExpired callback: Error: HTTP error 504Error: HTTP error 503Error: HTTP error 502Is there any difference between them? I'm asking, because it seems to me that sometimes when I got this 'sessionExpired' event session is don't really expired. Thanks
  12. i'm using following code and my confirmation still says "waiting for mobile confirmation" var SteamCommunity = require('steamcommunity'); var SteamCommunity = new SteamCommunity(); var SteamTotp = require('steam-totp'); var logOnOptions = { 'accountName': "winiar23", 'password': "zaqwsxcde", 'twoFactorCode': SteamTotp.generateAuthCode("XXXXXXXXXXXXXXXXXXXX=") //this line and the comma before it can be removed if you don't have mobile auth enabled, but I'm assuming you do if you plan to trade }; var s = 'XXXXXXXXXXXXXXXXXXXXXX='; //get this in the intro! //logs in via browser SteamCommunity.login(logOnOptions, function(err, sessionID, cookies, steamguard) { if (err) { console.log("There was an error logging in! Error details: " + err.message); process.exit(1); //terminates program } else { console.log("Successfully logged in as " + logOnOptions.accountName); SteamCommunity.chatLogon(); } SteamCommunity.startConfirmationChecker(12000, s ); });
  13. I see this error by the first time, steamcommunity display error.message: Not Logged In, when I try to get page with my trade offers. I don't know why it's happen but after about an hour this error disappears. And one more notice, bot can accept offers but can't send it (error 503 as Not Loged in).
  14. Hi. I created 2FA using node-steamcommunity. It was no restrictions about turn-off confirmation of trades on steam. But steam provide them. I save only revocation code, shared secret. Is there any way to get identity secret? I am trying to disable 2fa and turn on it again, to save all information, but steam have some problems with it now (mailformed response)
  15. I'm writing "npm install steamcommunity" and "npm steam-tradeoffer-manager" in the cmd but i have a little problem: http://i.imgur.com/FMtt4PX.jpg Is that normal? If not, how can i fix that? I'm following charredgrass tutorial. Sorry for bad english.
  16. Hello, how do I set bot's persona or gamesPlayed using steamcommunity? I was using steam-user all the time and it was working, but I need to switch to steamcommunity since I need to confirm trade offers. This is my bot login script: var BotID = 1; var Steam = require("steam"); var SteamTotp = require('steam-totp'); var SteamCommunity = require("steamcommunity"); var sclient = new SteamCommunity(); // var ACC_NAME = "username"; var ACC_PSW = "password"; var ACC_SHARED = "shared_secret"; var ACC_IDENTITY = "identity_secret"; var loggingIn = 0; login(); function login() { loggingIn = true; logger.info("Logging into steam..."); sclient.login({ "accountName":ACC_NAME, "password":ACC_PSW, "twoFactorCode": SteamTotp.getAuthCode(ACC_SHARED) }, function(err, sessionID, cookies, steamguard){ loggingIn = false; if(err) return login() //re-login console.log("Bot has logged in."); //====SET PERSONA STATE HERE // }); } sclient.on('sessionExpired',function(err){ if(loggingIn) return; logger.log("Session expired! Trying to re-log"); return login(); }); And I'm not sure how to set state to "Online".
  17. Hi. It is available to check before send trade offer that is user have enabled two Factor verification? I dont want escrow trades on my website.
  18. Just realized one of the offers is stuck and the confirmation did not go through, is there a way around this as I'm only using SteamCommunity.startConfirmationChecker(12000, s); Would polling solve this issue? is there any other way around it?
  19. I'm using email authentication. How am I supposed to login without needing to enter a steam guard code each time i call doLogin? login() looks like its setting cookies in it so i wasn't sure if i needed setcookies elsewhere. Thank you
  20. Hi, What is the right way to setup and enable 2FA and successfully log-in w/ TOTP (to get an auth code) and steam-community? I used this to setup 2FA on my second IOS device, everything went fine. https://github.com/DoctorMcKay/node-steamcommunity/blob/master/examples/enable_twofactor.js After successfully enabling 2FA, i used this example (from node-steam-tradeoffer-manager) to login, but I keep getting an "Steam login failed; SteamGuardMobile" error. So my question is, why am I getting this error? Did I do something wrong?
  21. Hi! I searched in all yours node's API but dont found any method to get the games that a specified account has? does have any method that i pass the steamid of an account and return the games that the account have ? Att Rene
  22. Hi, 1. Is it possible to renew session using node-steamcommunity in a fashion similar to node-steam-user.webLogOn() method? 2. Do I have to check if my session have expired every now and then or maybe there is event emited in such a situation? Thanks in advance, help will be much appreciated
×
×
  • Create New...