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. Getting a error when trying to execute this code: community.httpRequestPost('https://steamcommunity.com/market/sellitem/', { form: { sessionid: community.getSessionID(), appid: item.appid, contextid: item.contextid, assetid: item.assetid, amount: 1, price: 10000 // 10000 == $100 }, headers: headers, json: true }, (err, response, json) => { if(err) { console.log(`Sell item HTTPREQUESTPOST error: ${err.toString()}`); return; } console.log(json); }, "steamcommunity"); My headers are: 'Host': 'steamcommunity.com','Origin': 'https://steamcommunity.com''Referer': 'https://steamcommunity.com/market/''User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36','X-Prototype-Version': '1.7','X-Requested-With': 'XMLHttpRequest', Cookies: (first 4 getting from node-steam-tradeoffer-manager)steamLoginsteamLoginSecuresteamMachineAuthsessionidwebTradeEligibility (from your's reddit post)strInventoryLastContext=730_2Steam_Language=english I've tried to do request from REST Client with client's account cookies, headers, and it works (from client, not from node).
  2. Hi, i have a problem with GetConfirmations community.getConfirmations(SteamTotp.time(), SteamTotp.getConfirmationKey("DF+rFxd2PGEWUAXqPtXcNsISI9E=", SteamTotp.time(), "conf"), function(err, confirmations) { confirmations.forEach(function(confirmation) { console.log(confirmation); }); }); ?
  3. Hello, I'm currently for fun messing with changing my steam background every few seconds. It works quite well except for the fact that it wipes my profile showcases every time. https://steamcommunity.com/id/iLoveAnime69/ I tried to edit the module myself to get it to work but can't quite do it and can only get 1 to work. I see that there's a comment in profile.js that it's in the TODO but any help would be appreciated. When I read form.serializeArray() and print their names and values it has multiple names called "profile_showcase[]" however when it get's added to the values object array it just overwrites itself and I read that there can't be more than 1 of the same key case 'profileShowcase': var testname = "profile_showcase[]"; values[testname] = settings[i]; .So I just added the above to profile.js and it works for just 1 showcase. I don't really want to use the module to set the showcases, I'd just like them not to be cleared if there was a way to store it directly in the values array that's passed on. Any help would be appreciated and if someone could get it working i'd be willing to Paypal $15 if they'd want
  4. http://steamcommunity.com/app/{gameID}/tradingforum/ or http://steamcommunity.com/app/{gameID}/tradingforum/{postID}And i need there to edit a Thread. I can not find such a function. Can you help me ?
  5. I checked everything and tried but failed. How to automatic click Sign in in screenshot. I have link but need to make bot auto click that Sign in button. Screenshot: http://prnt.sc/d11i77 EDIT : I did it with Selenium Webdriver.
  6. I have two questions 1- How to login a non-steam website with steam cookies. I want to auto login bet site. 2- How to use steamuser with steamcommunity sametime.
  7. Hey there, i am using your steam-community node.js module. I am a trying to post a group comment. Since that function not yet is implemented in steam-community i tried to figure it out myself. On reddit i got this answer: Oops, my bad. I haven't seen this implemented anywhere but here are the details: URL: POST http://steamcommunity.com/comment/Clan/post/<GROUPID64>/-1/ Data: comment=<Actual comment text> count=6 sessionid=<sessionid that matches your cookie> However, i cant fingure out how to implement it. I tried to add this to groups.js: SteamCommunity.prototype.postGroupComment = function(gid, content, callback) {if(typeof gid === 'string') {gid = new SteamID(gid);} var self = this;this.httpRequestPost({"uri": "https://steamcommunity.com/comment/Clan/post/"+ gid.getSteamID64() + "/-1/", "form": {"sessionID": this.getSessionID(),"comment": content,"count": 6}}, function(err, response, body) {if(!callback) {return;} callback(err || null);}, "steamcommunity");}; Calling it like community.postGroupComment("gid", "Test"); However, steam just returns success: false. Could you help me or implement group comments in your steam-community? Thank you.
  8. i already binded it to steam-users and now i use the cookies from it in steamcommunity. if i try to bind the ip to steamcommunity i get an error that community.Constructor is not a function. community.Constructor({localAddress: ip}); https://github.com/DoctorMcKay/node-steamcommunity/wiki/SteamCommunity#constructoroptions anyone can help me?
  9. Hello, I have a problem with my code when I am trying to login() and editProfile() more than one account at once. My script: var community = new SteamCommunity(); var activationProcess = setInterval(prepareActivation, 20000); function prepareActivation() { doLogin(usernames[n], passwords[n]); n++; } function doLogin(accountName, password, authCode, twoFactorCode, captcha) { community.login({ // Some data }, function(err, sessionID, cookies, steamguard) { console.log(community.steamID.getSteamID64()); editProfile(username); }); } function setupProfile(username) { community.editProfile({ 'name' : username, }, function(err) { if (err) { console.log('Failed to Edit Profile'); console.log(err); } }); }As you can see from code I am trying to change SteamCommunity name. I do it through interval because I have 5 accounts. I do not understand why, but I am able to edit profile only for the first account. After that I get this error: Failed to Edit Profile Error: HTTP error 302 at SteamCommunity.<anonymous> (/Users/newbie/Work/Tools/node-steam-community/node_modules/steamcommunity/components/profile.js:123:22) at Request._callback (/Users/newbie/Work/Tools/node-steam-community/node_modules/steamcommunity/components/http.js:67:15) at Request.self.callback (/Users/newbie/Work/Tools/node-steam-community/node_modules/request/request.js:187:22) at emitTwo (events.js:106:13) at Request.emit (events.js:191:7) at Request.<anonymous> (/Users/newbie/Work/Tools/node-steam-community/node_modules/request/request.js:1044:10) at emitOne (events.js:96:13) at Request.emit (events.js:188:7) at Gunzip.<anonymous> (/Users/newbie/Work/Tools/node-steam-community/node_modules/request/request.js:965:12) at emitNone (events.js:91:20) I have no idea why It happens, because when I am trying other methods like joinGroup(), everything works fine. It will be great if someone could tell me the reason. Thank you very much.
  10. Hello, my bot sends the exchange, but does not confirm it. Please help me. Fasten code below. var SteamUser = require('steam-user'); var SteamCommunity = require('steamcommunity'); var SteamTotp = require('steam-totp'); var TradeOfferManager = require('steam-tradeoffer-manager'); var fs = require('fs'); var request = require('request'); var async = require('async'); var client = new SteamUser({ "dataDirectory": null }); var manager = new TradeOfferManager({ "steam": client, "domain": "site.ru", "language": "ru" }); var community = new SteamCommunity(); var steamID = SteamCommunity.SteamID; if(fs.existsSync('./users/users.json') && fs.existsSync('./users/master_ssfn')) { var users = JSON.parse(fs.readFileSync('./users/users.json')); var sentry = fs.readFileSync('./users/master_ssfn'); } else { console.log("Users file or master ssfn missing. Exiting.."); process.exit(1); } var user = users.thor; var logOnOptions = { "accountName": user.accountName, "password": user.password, "twoFactorCode": SteamTotp.getAuthCode(user.twoFactorCode) }; if(fs.existsSync('./polls/' + user.accountName + '.json')) { manager.pollData = JSON.parse(fs.readFileSync('./polls/' + user.accountName + '.json')); } client.setSentry(sentry); client.logOn(logOnOptions); client.on('loggedOn', function() { console.log("Logged into Steam account " + user.accountName); }); client.on('webSession', function(sessionID, cookies) { manager.setCookies(cookies, function(err) { if(err) { console.log(err); process.exit(1); return; } console.log("Got API key: " + manager.apiKey + " for user " + user.accountName); }); community.setCookies(cookies); community.startConfirmationChecker(10000, user.identitySecret); // Checks and accepts confirmations every 30 seconds client.setPersona(SteamUser.Steam.EPersonaState.Online, user.personaName); sessionInterval(3600000); }); manager.on('newOffer', function(offer) { var steamID64 = offer.partner.getSteamID64(); console.log('Received new offer from ' + steamID64); if(steamID64 == "steamID") { offer.accept(); } else { offer.decline(); } }); manager.on('sentOfferChanged', function(offer, oldState) { var offerTradeId = offer.id; var state = offer.state; console.log('Offer.Changed: ', offerTradeId + " is now " + state); request({ "url": "http://site/steam/set-offer-state/" + offerTradeId + "/" + state }); }); manager.on('pollData', function(pollData) { fs.writeFile('./polls/' + user.accountName + '.json', JSON.stringify(pollData)); }); function sessionInterval(time) { setTimeout(function() { console.log('Getting new cookies.'); client.webLogOn(); }, time); } /** * Express API to access SteamBot features and functions */ var express = require('express'); var app = express(); var bodyParser = require('body-parser'); app.use(bodyParser.json()); // for parsing application/json app.use(bodyParser.urlencoded({ extended: true })); // for parsing application/x-www-form-urlencoded app.get('/', function(req, res) { res.send('"Иди в дом, там мама тебе нальёт томатного." - Энди Картрайт'); }); app.post('/MakePlayerExchange/:steamid', function(req, res) { var user = new steamID(req.params.steamid); var bot = new steamID(req.body['botsteamid']); var token = req.body['token']; var uItems = req.body['userItems']; var bItems = req.body['botItems']; manager.getEscrowDuration(user, token, function(err, him, me) { if( err) { res.json({ "error": err }); return; } if( ! (him == 0 && me == 0)) { res.json({ "error": "Escrow Error. User has not enabled 2FA." }); return; } async.parallel({ userInventory: function(callback) { manager.loadUserInventory(user, 730, 2, true, function(err, inventory) { if( err) { callback(err); } else { callback(null, inventory); } }); }, botInventory: function(callback) { manager.loadUserInventory(bot, 730, 2, true, function(err, inventory) { if( err) { callback(err); } else { callback(null, inventory); } }); } }, function(err, results) { if( err) { res.json({ "error": err }); return; } var Exchange = manager.createOffer(user); var Message = "Site.ru | Thank You for trading with us. Here's your items from the Exchange page. This offer expires in 10 minutes."; var ExchangeUser = GetExchangeItems(results.userInventory, uItems); var ExchangeBot = GetExchangeItems(results.botInventory, bItems); if(typeof ExchangeUser.error != "undefined") { res.json(ExchangeUser); return; } if(typeof ExchangeBot.error != "undefined") { res.json(ExchangeBot); return; } Exchange.addTheirItems(ExchangeUser); Exchange.addMyItems(ExchangeBot); Exchange.send(Message, token, function(err, status) { if( err) { res.json({ "error": err }); return; } console.log('Exchange send: ', status); console.log('Exchange Offer ID: ', Exchange.id); res.json({ "offer": Exchange.id, "status": status, "state": Exchange.state }); }); }); }); }); function GetExchangeItems(Inventory, Items) { var ReturnItems = []; var i; for(i in Items) { var Item = i; var Count = +Items[i]; var j; for(j in Inventory) { var invItem = Inventory[j]; if(invItem.market_hash_name == Item) { //console.log('Should push here: ', invItem.classid); ReturnItems.push(invItem); Count--; } //console.log(invItem.market_hash_name, Count); if(Count == 0) { break; } } if(Count > 0) { return { "error": "Not enough Items in Inventory. Missing: " + Item + ", need " + Count + " more. Only got " + (+Items[i] - Count) }; break; } } //console.log(ReturnItems); return ReturnItems; }
  11. Hello, could you look here? It's seems to be right, but it doesn't conferm trades automaticaly var SteamUser = require('steam-user'); var SteamCommunity = require('steamcommunity'); var SteamTotp = require('steam-totp'); var TradeOfferManager = require('../lib/index.js'); // use require('steam-tradeoffer-manager') in production var fs = require('fs'); var client = new SteamUser(); var offers = new TradeOfferManager({ "steam": client, // Polling every 30 seconds is fine since we get notifications from Steam "domain": "example.com", // Our domain is example.com "language": "en" // We want English item descriptions }); var community = new SteamCommunity(); var logOnOptions = { "accountName": "*****", "password": "***", "twoFactorCode": SteamTotp.getAuthCode("****") }; if (fs.existsSync('polldata.json')) { offers.pollData = JSON.parse(fs.readFileSync('polldata.json')); } client.logOn(logOnOptions); client.on('loggedOn', function() { console.log("Logged into Steam"); }); client.on('webSession', function(sessionID, cookies) { offers.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: " + offers.apiKey); }); var trade = offers.createOffer("76561197982243076"); offers.loadInventory(570, 2, true, function(err, myItems) { if(err) { console.log(err); return; } trade.loadPartnerInventory(570, 2, function(err, theirItems) { if(err) { console.log(err); return; } trade.addMyItem(myItems[0]); //trade.addMyItem({"appid": "570","contextid": "2", "assetid": "994253688" }); trade.addTheirItem(theirItems[0]); trade.send(function(err, status) { if (err) { console.log("send" + err); } else { console.log("Offer #" + trade.id + " " + status) } }); }); }); community.setCookies(cookies); community.startConfirmationChecker(30000, "identitySecret"); }); And could you say, how bot can get assetid of item because than I use "id" from http://steamcommunity.com/profiles/76561198106184535/inventory/570/2 it brings error(26)
  12. Good afternoon. A question, is it possible to implement the purchase of a single item in the Steam store?
  13. I consider that error 504 when I use function acceptConfirmationForObject like an error 16 on newOffer and sometimes this offer is accepted. Can I track this offer with event unknownOfferSent and decline it?
  14. Hello, I have a question. I would like to send httpRequest request on store.steampowered.com website. But I noticed that after login cookies are set only on steamcommunity.com website. For this reason I am able to do it, but only as "guest" user. Is it possible somehow to send a request and stay online? I think It will be pretty good idea to share cookies between store and community like Steam does. Because both websites using the same cookie. Thank you.
  15. at least since 24 hours the mobile confirmations not working anymore. was there an steam update which has destroyed your plugin functionality? or are the steam servers are just broken and steam don't care about it? i found more people with the same problem, who saying it is just showing "Invalid session errors": https://www.reddit.com/r/SteamBot/comments/51x5ty/question_current_trade_status/ the website https://steamstat.us/ is switching the whole day between "normal" and "100.0% Failed Trades" as well.
  16. I can easily get the amount that the item is sold in the last hour, but how in the last 24 hours? Like it does on steam. I am happy to do restful calls or anything else
  17. I use code from topic "Minimal code to stay logged in forever..." to stay online. It's working perfectly, but bot keep disconnecting from chat after a while. I tried use "chatLogoff()" on sessionExpired - not working. Setting chatLogon interval to 4000 - not working. chatLogOnFailed event not triggering. Any advice to fix this ? Edit: I tested after "chatLogoff()" bot cannot go online in chat with chatLogon(). Am I doing something wrong ?
  18. Hi there. Im developing steam trade-bot but i have one issue during mothes. I need to reboot my server manually because after 1-3 days i got "Error malformed response" or smth like this. I got my code sample, can u say me whats wrong? i'm tired of this var client = new SteamUser; var steam = new SteamCommunity(); var community = steam; // alias var app = express(); app.listen(app_settings.port, function () { console.log('App is running on ' + app_settings.port); }); var logOnOptions = credentials.getDefault(); client.logOn(logOnOptions); client.on('webSession', function(sessionID, cookies) { community.setCookies(cookies); manager.setCookies(cookies); community.startConfirmationChecker('10000', app_settings.identity_secret); }); client.on('disconnected', function(){ setTimeout(function(){ var logOnOptions = credentials.getDefault(); client.webLogOn(logOnOptions); }, 10000); }); community.on('sessionExpired', function(err) { var logOnOptions = credentials.getDefault(); community.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); } }); } }); });
  19. Essentially it appears `p` in the query string in /inventoryhistory is blacklisted and will unconditionally error out. Just with this hilariously enough. ?foobar22=1 is fine. It looks like they're doing something more or less like primary key-based paging now with after_time and after_trade. Which must be interesting on their end sorting-wise. Also the pagination stat regexps are no longer valid because they apparently no longer exist as such. So fix-wise I guess remove the regexp lines and avoid using the properties. Also remove "&p=" + options.page from inventoryhistory.js. These things appear to be the only breaking changes. No actual markup changed beyond that inner text. Which was nice of them I suppose. Overall an interesting strategy of load reduction on Valve's part. I must say.
  20. Is there a full example of a bot that sends trade offers and then confirms using startconfirmationchecker as i always get this error once the method is called. Am i just missing something? https://gyazo.com/a59aa36fed4a641325a926e41ccb890f steamClient.on('logOnResponse', function(logonResp) { if (logonResp.eresult === Steam.EResult.OK) { console.log('Logged in'); steamFriends.setPersonaState(Steam.EPersonaState.Online); steamWebLogOn.webLogOn(function(sessionID, newCookie) { getSteamAPIKey({ sessionID: sessionID, webCookie: newCookie }, function(err, APIKey) { offers.setup({ sessionID: sessionID, webCookie: newCookie, APIKey: APIKey }); fetchtradeurl(); offerItems(); community.startConfirmationChecker(10000, identity_secret); }); }); } });
  21. node-steamcommunity version 3.21.2, I checked your code, there is no changes in new version, the same error may occur
  22. I have spent some time checking the node-steamcommunity GitHub wiki, and first of all : Dr. McKay, you are a hero for building up such an easy npm interface for the messy Steam API... I came up with some code to make sure I'm logged in almost 24/7 : // Modules are required and secret stuff is ready... function logOnSteam() { console.log("Logging in to Steam..."); steamCommunity.login(logOnOptions, function (e, sessionID, cookies, steamguard) { if (e) { console.log("There was an error logging in ! Error details : " + e.message); setTimeout(logOnSteam, 1000*60*4); // try to reconnect in 4 minutes return; } else { console.log("Successfully logged in as " + logOnOptions.accountName + " !"); steamCommunity.chatLogon(); // to appear online tradeOfferManager.setCookies(cookies, function (err) { if (err) { console.log(err); return; } }); } // automatic confirmation of EVERYTHING every "confirmationPeriod" ms steamCommunity.startConfirmationChecker(confirmationPeriod, identitySecret); }); } function checkSteamLogged() { steamCommunity.loggedIn( function (err, loggedIn, familyView) { if (err) { console.log(err); setTimeout(checkSteamLogged, 1000*60*4); // check again in 4 min } else if ( ! loggedIn ) { console.log("Steam login check : NOT LOGGED IN !"); logOnSteam(); } else { console.log("Steam login check : already logged in !"); } }); } steamCommunity.on('sessionExpired', function (err) { if (err) {console.log(err);} logOnSteam(); }); logOnSteam(); setInterval(checkSteamLogged, 1000*60*30); I guess this is enough to be safe... (unless I made some rookie mistake ?) This code is obviously the starting point for some TradeOfferManager handling, and I was wondering if I didn't go too far : if the 'sessionExpired' event is really triggered whenever we are not logged in, does it mean the 'checkSteamLogged()' function can be safely removed without harm ?'.startConfirmationChecker()' doesn't create a new instance each time it is called ? (I don't want to trigger 10 confirmations checkers leading to 10 times the intended check rate...)Thanks for any input !
  23. I've been working on getting a bot that uses multiple accounts to add comments to a profile, it works sort of like the report bots that have been released recently. My only issue is that when you have Steam Guard disabled, you can't make comments through the API. If anyone could show me how to use the cookies correctly so I don't have to repeatedly use Steam Guard codes that would be great. Here is my code: var SteamCommunity = require('steamcommunity'); var ReadLine = require('readline'); var fs = require('fs'); var SteamID = require("steamid"); var banshee = 'steamid64'; var comments = ['a', 'b', 'c', 'd', 'e']; var rand = Math.floor(Math.random() * comments.length); var concat = comments[rand]; var community = new SteamCommunity(); var steamID = new SteamID(banshee); var rl = ReadLine.createInterface({ "input": process.stdin, "output": process.stdout }); rl.question("Username: ", function(accountName) { rl.question("Password: ", function(password) { doLogin(accountName, password); }); }); function doLogin(accountName, password, authCode, captcha) { community.login({ "accountName": accountName, "password": password, "authCode": authCode, "captcha": captcha }, function(err, sessionID, cookies, steamguard) { if(err) { if(err.message == 'SteamGuard') { console.log("An email has been sent to your address at " + err.emaildomain); rl.question("Steam Guard Code: ", function(code) { doLogin(accountName, password, code); }); return; } if(err.message == 'CAPTCHA') { console.log(err.captchaurl); rl.question("CAPTCHA: ", function(captchaInput) { doLogin(accountName, password, null, captchaInput); }); return; } console.log(err); process.exit(); return; } console.log("Logged on!"); community.getSteamUser(steamID, function(err, user) { if(err) console.log(err); else { user.comment(concat, function(err) { if(err) console.log(err); }); console.log("Comment posted!"); setTimeout(function() { process.exit(); }, 2000); } }); }); }
  24. Basicly the tittle says it all.Would it be possible to add this?If yes could the developer please add this? Thanks.
×
×
  • Create New...