Jump to content
McKay Development

Search the Community

Showing results for tags 'node-steam-user'.

  • 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, sry to bother you. I have this problem where in my working machine it is working perfectly but in my server it's just not working. I have tried disabling my firewall, debugging the app, rewriting the code but still not being called in my server but in my working machine it is. let playDefault = 730; module.exports.logIn = function (cb) { console.log('[Bot] Starting Bot...'); client.logOn(logOptions); console.log('[Bot] Logging into Steam...'); client.on('loggedOn', () => { console.log('[Bot] Logged into Steam'); client.setPersona(SteamUser.Steam.EPersonaState.LookingToTrade); client.gamesPlayed(playDefault); if (cb != null) cb(); else console.log('It was null :/'); }); }; client.on('error', function(e) { console.log('Steam Error: '); console.log(e); }); client.on('webSession', (id, cookies) => { console.log('\n\nwebSession!!!!!!!!!!!!!!'); console.log(cookies); manager.setCookies(cookies); community.setCookies(cookies); community.startConfirmationChecker(1000, 'removed') }); 'use strict'; const SteamUser = require('steam-user'); const SteamTotp = require('steam-totp'); const SteamCommunity = require('steamcommunity'); const TradeManager = require('steam-tradeoffer-manager'); const request = require('request'); const steamapikey = 'key'; const client = new SteamUser(); const community = new SteamCommunity(); const manager = new TradeManager({ steam: client, community: community, language: 'en' }); const logOptions = { accountName: 'user', password: 'password', twoFactorCode: SteamTotp.generateAuthCode('secret') };
  2. hello i am having a weird issue when i login in for the first time using email authentication my "loggedOn" function gets called twice, but if i was to login again with the same details it would be back to normal, and it works normally if i was to sign in using my account with mobile authentication, any suggestions please help my full code is: const TradeOfferManager = require('steam-tradeoffer-manager'); const SteamCommunity = require('steamcommunity'); const SteamUser = require('steam-user'); var colors = require('colors/safe'); let date = require('date-and-time'); var prompt = require('prompt'); const chalk = require('chalk'); var sleep = require('sleep'); require('console-stamp')(console, '[HH:MM:ss]'); const RedStyle = chalk.red; const YellowStyle = chalk.yellow; const GreenStyle = chalk.green; const client = new SteamUser(); const community = new SteamCommunity(); const manager = new TradeOfferManager ({ steam: client, community: community, language: 'en' }); //Welcome MESSAGE! console.log(GreenStyle('-------------------------------------------')); console.log(GreenStyle(' Welcome To My Group Invite Blocker ')); console.log(GreenStyle('-------------------------------------------')); console.log(GreenStyle(' ')); console.log(YellowStyle('-------------------------------------------')); console.log(YellowStyle(' Made By Ben Wall ')); console.log(YellowStyle('-------------------------------------------')); console.log(YellowStyle(' ')); console.log(RedStyle('-------------------------------------------')); console.log(RedStyle('NOTE: IF YOU LOGIN USING STEAM EMAIL ')); console.log(RedStyle('AUTHENTICATOR ENTER THE CODE AND THEN ')); console.log(RedStyle('SIMPLY RESTART AND RE-LOGIN TO THE BOT ')); console.log(RedStyle('DUE TO A UNKNOWN PROBLEM THAT IM WORKING ')); console.log(RedStyle('ON, NOW YOU WONT NEED THE CODE AS IT ONLY ')); console.log(RedStyle('REQUIRES CODE UPON FIRST LOGIN, IF YOU USE ')); console.log(RedStyle('MOBILE TO AUTHENTICATE THEN YOU ARE FINE TO')); console.log(RedStyle('USE IT AS INTENDED, JUST MORE STEPS FOR THE')); console.log(RedStyle('EMAIL AUTHENTICATOR GUYS ')); console.log(RedStyle('-------------------------------------------')); var schema = { properties: { Account_Name: { description: colors.green('Account Name'), }, Password: { description: GreenStyle('Password'), hidden: true, replace: '*' }, } }; prompt.start(); prompt.get(schema, function (err, result) { const logOnOptions = { accountName: result.Account_Name, password: result.Password }; //logon using credentials that you typed in client.logOn(logOnOptions); client.setOption("promptSteamGuardCode", false); client.setOption("autoRelogin", true); var mobile = { properties: { Steam: { description: GreenStyle('Steam Mobile Code') }, } }; var email = { properties: { SteamE: { description: GreenStyle('Steam Email Code (PLEASE RESTART BOT AFTER)') }, } }; //Checks if you are using Mobile authenticator or email Code client.on('steamGuard', function(domain, callback) { if(domain == null){ prompt.start(); prompt.get(mobile, function (err, result) { var code = result.Steam; callback(code); }); }else{ prompt.start(); prompt.get(email, function (err, result) { var code = result.SteamE; callback(code); }); } }); }); let now = new Date(); //this is what happens when succesfully logged on client.on('loggedOn', () => { client.on("accountInfo", function(name, country) { console.log(GreenStyle(' ')); console.log(GreenStyle('-------------------------------------------')); console.log(GreenStyle('Group Invite Blocker 3000 ')); console.log(GreenStyle('-------------------------------------------')); console.log(GreenStyle("Your Country: " + country)); console.log(GreenStyle('The Time Upon Logon: ' + date.format(now, 'HH:mm:ss'))); console.log(GreenStyle('Succesfully logged in as: ' + name)); console.log(GreenStyle('-------------------------------------------')); console.log(GreenStyle(' ')); client.setPersona(SteamUser.Steam.EPersonaState.Online); }); }); //READ THIS: IMPORTANT //IF YOU DO NOT HAVE FAMILY PIN ENABLED DELETE THE NUMBERS //EXAMPLE: //WITHOUT FAMILY VIEW PIN: //manager.setCookies(cookies); //community.setCookies(cookies); //WITH FAMILY VIEW PIN: //manager.setCookies(cookies, 1234); //community.setCookies(cookies, 1234); client.on('webSession', function(sessionID, cookies) { console.log(GreenStyle("Got Web Session! (this is good)")); manager.setCookies(cookies, 4265); community.setCookies(cookies, 4265); }); //This is the code which blocks group invites automatically client.on('groupRelationship', function (steamID, relationship) { if (relationship == SteamUser.Steam.EClanRelationship.Invited){ client.respondToGroupInvite(steamID, false); console.log("Declined Steam Group Invite"); } });
  3. hello, i wanted to make my bot so that anyone can login to it and use it, including people who need to authenticate using the email code, the bot is to block groups automaticaally, especially csgo scam groups, but i cant get my code to work, i have tried to put null in quotations, but it seems that it does not get triggered, i have made an account that has email code to login and i use my main which has steamguard mobile code to login, but when i login the mobile authenticator account works but the email one doesnt it skips login and goes straight for the web session, the first time logging in with the email auth account it logged in twice according to the client.logged on event, then after that it skips the logOn event and goes straight for the websession. client.logOn(logOnOptions); client.setOption("promptSteamGuardCode", false); var mobile = { properties: { Steam: { description: 'Steam Mobile Code: ' }, } }; var email = { properties: { SteamE: { description: 'Steam Email Code: ' }, } }; client.on('steamGuard', function(domain, callback) { if(domain == null){ //console.log('You Are Using Phone!'); prompt.start(); prompt.get(mobile, function (err, result) { var code = result.Steam; callback(code); prompt.stop(); }); }else{ console.log('You Are Using Email!'); prompt.start(); prompt.get(email, function (err, result) { var code = result.SteamE; callback(code); prompt.stop(); }); }; and here is my full code, please help me: const TradeOfferManager = require('steam-tradeoffer-manager'); const SteamCommunity = require('steamcommunity'); const SteamUser = require('steam-user'); var prompt = require('prompt'); require('console-stamp')(console, '[HH:MM:ss]'); const client = new SteamUser(); const community = new SteamCommunity(); const manager = new TradeOfferManager ({ steam: client, community: community, language: 'en' }); var schema = { properties: { Account_Name: { }, Password: { hidden: true, replace: '*' }, } }; prompt.start(); prompt.get(schema, function (err, result) { const logOnOptions = { accountName: result.Account_Name, password: result.Password, rememberPassword: false, }; client.logOn(logOnOptions); client.setOption("promptSteamGuardCode", false); var mobile = { properties: { Steam: { description: 'Steam Mobile Code: ' }, } }; var email = { properties: { SteamE: { description: 'Steam Email Code: ' }, } }; client.on('steamGuard', function(domain, callback) { if(domain == null){ //console.log('You Are Using Phone!'); prompt.start(); prompt.get(mobile, function (err, result) { var code = result.Steam; callback(code); prompt.stop(); }); }else{ console.log('You Are Using Email!'); prompt.start(); prompt.get(email, function (err, result) { var code = result.SteamE; callback(code); prompt.stop(); }); }; client.on('loggedOn', () => { client.on("accountInfo", function(name, country) { console.log(' '); console.log('-----------------------------------'); console.log('Group Invite Blocker 3000'); console.log('-----------------------------------'); console.log('Succesfully logged in as: ' + result.Account_Name); console.log("Your Online Name: " + name); console.log("Your Country: " + country); console.log('-----------------------------------'); console.log(' '); client.setPersona(SteamUser.Steam.EPersonaState.Online); //client.gamesPlayed(["BOT TESTING",271590]); // client.gamesPlayed(271590); //Playing GTA 5 }); }); }); client.on('webSession', function(sessionID, cookies) { console.log("Got Web Session! (this is good)"); manager.setCookies(cookies, family view pin); community.setCookies(cookies, family view pin); }); client.on('groupRelationship', function (steamID, relationship) { if (relationship == SteamUser.Steam.EClanRelationship.Invited){ //console.log("Succesfully Decline Group Invite From" + " " + steamID); client.respondToGroupInvite(steamID, false); console.log("Declined Steam Group Invite"); } }); });
  4. I am working in a steam trade bot just for send offers, not anymore. And have to use node-steamcommunity because I need necessarily the startConfirmationChecker metod. But I want to use just this module node-steam-user because the maker says this is a improve... the problem is exists the startConfirmationChecker metod in this module?
  5. aloha, i got this error: Error: The specified profile could not be found.with this code: var SteamUser = require('steam-user'); var SteamCommunity = require('steamcommunity'); var SteamTotp = require('steam-totp'); var SteamID = require('steamid'); var config = require('./config.js'); var client = new SteamUser(); var community = new SteamCommunity(); var fs = require("fs"), readlineSync = require("readline-sync"), steamID = readlineSync.question("SteamID: ") //text = readlineSync.question("Text: ") var accounts = []; var arrayAccountsTxt = fs.readFileSync("accounts.txt").toString().split("\n"); for (i in arrayAccountsTxt) { var accInfo = arrayAccountsTxt[i].toString().trim().split(":"); var username = accInfo[0]; var password = accInfo[1]; accounts[i] = []; accounts[i].push({ }); } //arrayAccountsTxt.forEach(logOnOptions); var logOnOptions = { "accountName": username, "password": password }; client.logOn(logOnOptions); client.on('loggedOn', function() { console.log("[gubiCBot] Uruchomiono poprawnie."); ///client.chatMessage(steamID, 'elo'); community.getSteamUser(steamID, function(err, user) { if(config.acceptInvite) client.addFriend(steamID); if(err) return console.log("error: "+err); user.comment(text, function(error){ if (error) return console.log('err: '+steamID); console.log("done."); }); }); }); can u help me guys, i started with js few days ago and i don't know how to fix this..
  6. hello, this is my code client.on("friendMessage", function(steamID, message){ if(message == "!group" || message == "!Group"){ client..inviteToGroup(steamID, config.groupid); } }); i get no errors when running my code but when i type !group to my test bot it doesnt give any errors and does not invite me to the group i specified in the config (yes i used the group ID number which is 30012005) sorry for any formating problems i manualy typed this because the code is on my raspberry pi 3, where all my other bots are stored and run.
  7. I am get 429 error when try to get api key. Its happens only on new account. Independently have account limitations or not.On old accounts its work fine and i can get api key without error. Manually i can get api key without problem. steamWebLogOn.webLogOn(function(sessionID, cookies) { manager.setCookies(cookies, function(err) { if (err) { console.log(err); process.exit(1); // Fatal error since we couldn't get our API key return; } console.log("Got API key: " + manager.apiKey); }); community.setCookies(cookies); community.startConfirmationChecker(30000, Mobile.identity_secret); // Checks and accepts confirmations every 30 seconds });
  8. Hello Someone have code to creating multiple accounts? Im tried and always after few I have error 84, I tried create next account after higher delay but same problem. Better was with reloging after every account but also after 3-4 same error.
  9. Is it possible to log in to external site with steam with this module ?
  10. Hey, I'm trying to implement a login process for my bots, but it seems that the sentry files are not stored within the dataDirectory. This is my current code: this.dataDir = 'data/' this.client = new Steam.CMClient() this.user = new SteamUser(this.client, { promptSteamGuardCode: false, dataDirectory: this.dataDir }) this.community = new SteamCommunity() this.user.storage.on('save', (filename, contents, callback) => { if (filename.includes('sentry.')) { filename = `${this.userName}.sentry` } fs.writeFile(path.join(this.dataDir, filename), contents, err => { if (err) { console.error(`Can't write ` + filename + ': ' + err.message) return callback(err) } callback(err) }) }) // I implemented the read function respectively After that I have a couple of other listeners (e.g. webSession). The issue is, only the cellid-x.txt and servers.json are actually created within the data directory, it seems that I'm not able to receive the sentry file no matter what I do. I handle the login via the regular logOn() function.
  11. Hey Guys, Is it possible to change my steam profile name with node-steam-user lib ? Or maybe user node-steam(https://github.com/seishun/node-steam) and pass connection object ? Thanks
  12. Is there some way to create a newline instead of doing things like this: client.chatMessage(senderId, "firstLine"); client.chatMessage(senderId, "newline");Using this way will lead to being blocked by the rate limit very fast I think.
  13. Using the code below I'm not able to set the UI mode to desktop (3). I've commented the line out and tried if the event when a new message is received is triggered and this doesn't work too. Any idea how to fix these two problems? Code: var SteamCommunity = require('steamcommunity'); var steam = new SteamCommunity(); var SteamTotp = require('steam-totp'); var sharedSecret = ""; var logOnOptions = { 'accountName': "x", 'password': "y", 'twoFactorCode': SteamTotp.generateAuthCode(sharedSecret), }; /logs in via browser 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(); } }); //check if we're logged into steam.on('chatLoggedOn', function(){ console.log("ready to chat"); }); steam.on('chatLogOnFailed', function(){ console.log("chat failed!"); }); steam.on('friendRelationship', (steamid, relationship) => { console.log("new request!"); steam.chatMessage(steamid, 'Hello there! Thanks for adding me!'); }); steam.on('friendOrChatMessage', (senderId, text) => { console.log("received: " + text); });
  14. Hi all! Is there any way to idle a game without showing it and just appear as connected in steam? I've tested client.gamesPlayed([0, apptoidle]); client.gamesPlayed([apptoidle, 0]); client.gamesPlayed(['', apptoidle]); client.gamesPlayed([apptoidle, '']); All of them show that I'm playing ${apptoidle} or non-steam game. I need this to change apptoidle periodically without sending notifications that I'm playing any game. Thanks in advance for any help
  15. Hey, I am using the steam-user to connect with my user: // Steam logon options var logOnOptions = { "accountName": config.username, "password": base64.decode(config.password), "twoFactorCode": SteamTotp.getAuthCode(config.authCode) }; console.log('Trying to connect to steam...'); client.logOn(logOnOptions); and using the events: client.on('loggedOn', function() { console.log("Successfully logged in to steam"); }); client.on('error', function(e) { console.log('Steam Error: '); console.log(e); }); client.on('disconnected', function(eresult, msg) { console.log('Steam disconnected: '); console.log(eresult); }); Most of the time the connection is working and everything works ok, however there are times where I call the login function and the loggedOn function isn't being called. It seems like steam junky servers are causing that. However I would still like to retry connect every time I fail. Didn't manage to find any event to catch if I failed to connect - so I can try to reconnect and haven't seem any variables inside client that I can use to check if the connection succeeded. Any way to solve this issue? Allow the steam user to retry connect or any other solution to make sure it will connect eventually?
  16. Yeah i know what this error is about, but my question is, will the node-steam-user try again later if bot can't login cuz have rearched the RateLimitExceeded ??
  17. I have already changed the promptSteamGuardCode to false, and maked a steamGuard handler this.getCode(shared, function(code) { callback({ "accountName": login, "password": pw, "twoFactorCode": code, "rememberPassword":true, "promptSteamGuardCode": false }); }); client.on('steamGuard', function(domain, callback) { helper.getCode(config.sharedse, function(code){ callback(code); }); });But sometimes i still got the Steam app code request, and i have to restart the node..
  18. Hello, i try run your library ( and i catch this error. I need run exactly your library, because this support websockets. Beacuse i need proxy for multiple connections (more than 1000 active connections). What can i do in this case? If you can, please find me in telegram: http://t.me/gefort for comfortable communication:) Thanks you! // ERROR details { eresult: 5, count_loginfailures_to_migrate: 0, count_disconnects_to_migrate: 0 } events.js:141 throw er; // Unhandled 'error' event ^ Error: Disconnected at CMClient.connect.CMClient._disconnected (/home/do/Documents/backgame/nsteam/node_modules/steam-client/lib/cm_client.js:340:22) at emitThree (events.js:97:13) at WebSocketConnection.emit (events.js:175:7) at WebSocket.<anonymous> (/home/do/Documents/backgame/nsteam/node_modules/steam-client/lib/websocket_connection.js:57:13) at emitThree (events.js:97:13) at WebSocket.emit (events.js:175:7) at /home/do/Documents/backgame/nsteam/node_modules/websocket13/lib/base.js:363:12 at pipe (/home/do/Documents/backgame/nsteam/node_modules/websocket-extensions/lib/pipeline/index.js:37:40) at Pipeline._loop (/home/do/Documents/backgame/nsteam/node_modules/websocket-extensions/lib/pipeline/index.js:44:3) at Pipeline.processIncomingMessage (/home/do/Documents/backgame/nsteam/node_modules/websocket-extensions/lib/pipeline/index.js:13:8) // CODE var Steam = require('steam-client'); var steamClient = new Steam.CMClient(Steam.EConnectionProtocol.WebSocket); steamClient.connect(); steamClient.on('connected', function() { console.log('connected!') steamClient.logOn({ "account_name": "My steam username", "password": "my password" }); }); steamClient.on('logOnResponse', function(details) { console.log('details', details) });
  19. When I try to use newest version of steam-user I got this error: /node_modules/steam-client/node_modules/mckay-steam-resources/steam_language_parser/index.js:8 process.chdir(languagePath); ^ Error: ENOENT: no such file or directory, uv_chdir at Error (native) at Object.<anonymous> (/node_modules/steam-client/node_modules/mckay-steam-resources/steam_language_parser/index.js:8:9) at Module._compile (module.js:410:26) at Object.Module._extensions..js (module.js:417:10) at Module.load (module.js:344:32) at Function.Module._load (module.js:301:12) at Module.require (module.js:354:17) at require (internal/module.js:12:17) at Object.<anonymous> /nodejs/node_modules/steam-client/node_modules/mckay-steam-resources/index.js:83:1) at Module._compile (module.js:410:26)
  20. I was looking through the API for steam-user. I can't seem to find the event-id for when I send a message. I found one for receiving but not sending. Anyone know? Thanks
  21. Is it possible to login without asking for the users password and retain much or all of the functionality of steam-user? This page Says that asking users for a username and password is against the terms of use. Obviously this isn't an issue for yourself or friends but on the very off chance the app or website using steam-user gets popular i'd hate to have valve get annoyed about it. They say to use openID however, from what i can tell, all that will do is return to you the steam user id that the user was authenticated as... Obviously this isn't that great for say, trading, or sending messages, or setting personas or avatars ( which uses the web cookies ). I'm not familiar with openID so maybe more is returned but it after a bit of digging i don't think that's the case. Obviously after a user has logged in once i can set "remember password" and just hope that the loginkey stays valid for a long time. Essentially i'd like to let users login but not directly have to ask them for their password
  22. I'd like to know how to do that, or at least to have the friends list to select one randomly. Thanks!
  23. I'm still pretty new and I've been tinkering around with this. I got friend requests to auto accept with. client.on('friendRelationship', function(steamID, relationship) { if (relationship == SteamUser.Steam.EFriendRelationship.RequestRecipient) { client.addFriend(steamID); console.log("Added " + steamID.getSteam3RenderedID() + "!"); } }); How would I auto accept group invites? Thanks!
  24. Hi Doc, hi everybody, I have been trying to code a simple game idler for CS:GO, and I dug into Steam-card-farmer's code to customize it as simply as possible. So far, the code I have is : // Reload every hour through an external "forever" call setTimeout(function () { process.exit(0); }, 1000*3600*1); // Requires var SteamUser = require('steam-user') var SteamTOTP = require('steam-totp'); // Instance var client = new SteamUser(); // Secret personal data : klonaway var accountName = "myAccount"; var password = "myPassword"; var sharedSecret = "mySharedSecret"; var identitySecret = "myIdentitySecret"; // Preparing log on options var logOnOptions = { 'accountName': accountName, 'password': password, 'twoFactorCode': SteamTOTP.generateAuthCode(sharedSecret) }; // Sign into Steam client.logOn(logOnOptions); client.on('loggedOn', function(details) { console.log("Successfully logged on Steam as " + accountName); client.webLogOn(); client.once('webSession', function(sessionID, cookies) { client.gamesPlayed({ "game_id": 730, }); }); });From the console, it seems to work fine, but I cant't get any of the thousands of card drops awaiting to actually drop. Any insight into what I must have missed ? Thanks a lot for any hint and happy botting !
  25. I'm using steam-totp to automate logging in like so... and it's prompting me for a steam guard code: user.logOn({ accountName: 'user', password: 'pass', twoFactorCode: SteamTotp.generateAuthCode(this.shared_secret) });I first used user.createAccount()Then I used user.enableTwoFactor() and saved the response from calling enable two factor. { shared_secret: '***', serial_number: '***', revocation_code: '***', uri: '***', server_time: '***', account_name: 'user', token_gid: '***', identity_secret: '***', secret_1: '***=', status: 1 } I then finalized my two factor user.finalizeTwoFactor(shared_secret, smsCode) After this I logged into the steam mobile app - it prompted me for a steamguard code... so i clicked send SMS code to use this device and when I entered the code it allowed me to log into the steam mobile... I have a feeling that this overrode my enableTwoFactor details I saved earlier... Can anybody comment on this?
×
×
  • Create New...