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. So, there's a problem I've had with my both that I can't really understand. I am not really looking for people to spoon feed me the code, just for someone with more experience to point it out to me. After I activated Steam Guard on my Phone. To authenticate my BOT I use the steam-totp module. What's even weirder is that the BOT logs in through node-steam-user without any problems, but has some problems when it needs to log in through node-community. Here's the exception I've been getting: Node-steam-user: authenticated. // node-steam-user works! Error: SteamGuardMobile // node-steamcommunity fails. at SteamCommunity.<anonymous> (C:\Users\Brian\node_modules\steamcommunity\index.js:141:14) at Request._callback (C:\Users\Brian\node_modules\steamcommunity\components\http.js:67:15) at Request.self.callback (C:\Users\Brian\node_modules\request\request.js:188:22) at emitTwo (events.js:106:13) at Request.emit (events.js:191:7) at Request.<anonymous> (C:\Users\Brian\node_modules\request\request.js:1171:10) at emitOne (events.js:96:13) at Request.emit (events.js:188:7) at IncomingMessage.<anonymous> (C:\Users\Brian\node_modules\request\request.js:1091:12) at IncomingMessage.g (events.js:291:16)And here you can see a simplified version of my BOT (not showing the entire code for obvious reasons) that tries just to authenticate. Even though node-steam-user authenticates without any problems, node-steamcommunity fails. var SteamUser = require('../index.js'); var client = new SteamUser(); var SteamCommunity = require('steamcommunity'); var community = new SteamCommunity(); var SteamTotp = require('steam-totp'); function getCode(shared_secret, callback) { SteamTotp.getTimeOffset(function (offset) { return callback(SteamTotp.getAuthCode(shared_secret, offset)); }) } getCode('shared-secret', function (code) { client.logOn({ "accountName": "username", "password": "password", "twoFactorCode": code.toString() }); community.login({ "accountName": "username", "password": "password", "twoFactorCode": code.toString() }, function (err){ if (err !== null) { console.log(err); } else {console.log("SteamCommunity - authenticated");} }); }); client.on('loggedOn', function(details) { client.setPersona(SteamUser.EPersonaState.Online); client.gamesPlayed("Test game!"); });
  2. I am really interested in finding if there's a method to retrieve all the badges crafted by a specific user (SteamID). If not, what are the possible alternatives in doing so? Is there a steam web API method built for that?
  3. Say, I'd like to login to this website using Steam via NodeJS. How do I go about doing that? I tried a dirty solution, but it doesn't redirect me to the third party website callback url. community.httpRequestGet(url, {}, function(error, response, data) { var url = $("#openidForm", data).attr("action"); var formdata = $("#openidForm", data).serializeObject(); community.httpRequestPost(url, formdata, function(error, response, data) { console.log(error, response.statusCode); console.dir(response.headers) }); });
  4. Hi, When I'm calling getInventoryContexts on a CSteamUser object, i get the Malformed response error message. I had no similiar problem before, but happens consantly on this new account i'm testing it with. community.getSteamUser(id, function(err, user){ ... user.getInventoryContexts(function(err, apps){ if (err) return next(err); // Error gets thrown here ... The account is not limited for sure and I'm using steamcommunnity 3.30.6. Any suggestions will be greatly appreciated. Thanks in advance.
  5. Do you know what happened with IEconItems? Already second day this interface does not work
  6. Hey, So I have a piece of code: community.getSteamUser(offer.partner, function(data){ if I did a console.log it returns null. I also tried with new SteamID(offer.partner) and also offer.partner.toString() always it's null for me. What am I doing wrong?
  7. Hello! Is it possible to get analyst price from https://opskins.com/?loc=price_lookup&app=730_2 as API? Or how can I calculate analyst price from https://api.opskins.com/IPricing/GetPriceList/v1/?appid=730 Best wishes, Gleb
  8. Hello, I'm trying to make my bot post on user profiles on successful trade. Can anyone help me with that as I have no idea where to start.
  9. Hello. When I am logged on steamcommunity.com and try inserting parental pin too many times it actually gives an error telling me about it. On node-steamcommunity if I try wrong pin too many times it always give same error "Incorrect PIN", even when I have correct PIN. Can it be changed? Also can I somehow insert parental pin in node-steam-user without actually using nodesteamcommunity? Thanks.
  10. Hey there, i hope this is the right place to ask but i'm kinda desperate. I can't seem to accept traeoffers anymore using my steam desktop autheticator all of a sudden. Up until today i accepted a few hundred trades a week without a problem but now i just get a whitescreen when refreshing and looking for new offers to confirm: Screenshot: https://i.gyazo.com/8ce589854df8a6627823fccadf9f9c8a.png I'd really appreciate if you guys could help me out. I still have quite a bit of money on the account. Regards Avocadocoin
  11. Hello, I'm getting this error every now and then after calling postUserComment() and inviteUserToGroup(). Since this happens in rare occasions I wasn't able to check the value of response.body, but i think this happens when i lose the steamcommunity session? .../node_modules/steamcommunity/components/http.js:101 if (response.statusCode == 403 && response.body && response.body.match(/<div id="parental_notice_instructions">Enter your PIN below to exit Family View.<\/div>/)) { TypeError: response.body.match is not a function at SteamCommunity._checkHttpError (.../node_modules/steamcommunity/components/http.js:101:67) at Request._callback (.../node_modules/steamcommunity/components/http.js:50:61) at Request.self.callback (.../node_modules/request/request.js:186:22) at emitTwo (events.js:106:13) at Request.emit (events.js:192:7) at Request.<anonymous> (.../node_modules/request/request.js:1081:10) at emitOne (events.js:96:13) at Request.emit (events.js:189:7) at IncomingMessage.<anonymous> (.../node_modules/request/request.js:1001:12) at Object.onceWrapper (events.js:291:19) Can I handle this somehow? Because it's crashing my app and i don't know how to handle this other than restarting everything with forever. Thanks
  12. I know theres a listener for new confirmations and all, I've tried making it myself but couldn't get it to work. Not at my main system right now so cant provide the code I had written. Help is appreciated
  13. Hello. I have problem with something like Steam CommendBot. I can not save accounts :/ 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); } }); }); } I tried to use database.json SteamCommunity = require 'Steamcommunity' jsonfile = require 'jsonfile' jsonfile.spaces = 2 try database = jsonfile.readFileSync 'database.json' catch e database = {} secret = null inquirer.prompt [ {name: 'username', message: 'Username:'} {name: 'password', message: 'Password:', type: 'password'} ] .then ({username, password}) -> database[username] = {} client = new SteamUser client.setOption 'promptSteamGuardCode', false client.setOption 'dataDirectory', null client.logOn accountName: username, password: password, client.on 'steamGuard', (domain, callback) -> if domain inquirer.prompt [name: 'code', message: "Steam guard code (#{domain}):"] .then ({code}) -> callback code else inquirer.prompt [name: 'secret', message: 'Two-factor shared secret:'] .then ({secret}) -> SteamTotp.generateAuthCode secret, (err, code) -> database[username].secret = secret callback code client.on 'sentry', (sentry) -> database[username].sentry = sentry.toString('base64') jsonfile.writeFileSync 'database.json', database client.on 'LoggedOn', (Details) -> database[username].password = password process.exit 1 I don't know even how to paste it. Anyway if it always same code then every node bot.js I have to add new account ;/
  14. 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.
  15. Hey guys, im getting always a 400 Error when trying to invite a User to a group. Is there some way to debug it or am i doing something wrong? var SteamCommunity = require('steamcommunity'); var SteamID = require('SteamID'); var community = new SteamCommunity(); community.login({ "accountName": "*****", "password": "*****", "authCode": null, "twoFactorCode": null, "captcha": null }, function (err, sessionID, cookies, steamguard) { if(!err) console.log("Sucessfull :)"); community.inviteUserToGroup("***", new SteamID("****"), function (err) { if(err) console.log("ERROR: :/ " + err.message); }); }) Output: Sucessfull ERROR: :/ HTTP error 400 Thanks for your help.
  16. Good afternoon. A question, is it possible to implement the purchase of a single item in the Steam store?
  17. Hello, I have some questions about node steamcommunity. Is there a way i can get the last added gift or item that was added to my inventory. and then get the item / gift id that i can accept / activate or send it to someone or so ? Or how can i get my custom URL or profile name for custom url with node steamcommunity ? because my accounts have customURL and not want save them all and check what is for what account . thats why ask can get it with steamcommunity with a parameter ? #https://steamcommunity.com/id/profilenameinURL/inventory/# I try to autoactivate or send to on my other account when someone gift or trade me something. And can i accept and unnpack gift on my account ? And i coded that it work with steamguard but for that i deactivated my mobileauth. can i code it that it save my mobile auth like it saves steamguard that i not always need enter it when login at same machine ? I have forgotten: when i try community.httpRequestGet('https://steamcommunity.com/id/profile/inventory/ or any other link i get error 302 . can the node steamcommunity note follow / follow redirect the url ? Its a bit hard to get through the whole node steamcommunity functions etc not so easy atm for me. Thanks hope someone here can help , and answer my questions.
  18. Hi , Sometime Bot does not accept incoming offers. it gets stuck at offer.accept in newOffer. (Most of the time. it works, around 10% offers get stuck in my testing) So what's the best way to accept newOffer in bot? Also if bot get stuck and I restart, how to force bot to accept that old offer. Bot Stuck Example: (nothing happens after Receiving new offer from me) My code: 'use strict' // all packages var SteamUser = require('steam-user') var SteamTotp = require('steam-totp') var SteamCommunity = require('steamcommunity') var TradeOfferManager = require('steam-tradeoffer-manager') var express = require('express') var bodyParser = require('body-parser') var fs = require('fs') var log = require('./log') var config = require('config.json')('./config.json') var request = require('request') // Now steam var community = new SteamCommunity() var SteamID = SteamCommunity.SteamID var client = new SteamUser() // varable var admin1 = '76561198046099284' // Me // var admin2 = '76561198061798481' // Bhanu var port = 3000 // Steam LoginLogin Details var logOnOptions = { 'accountName': config.username, // Bot username 'password': config.password, // Bot password 'twoFactorCode': SteamTotp.generateAuthCode(config.shared_secret) } var manager = new TradeOfferManager({ 'steam': client, // Polling every 30 seconds is fine since we get notifications from Steam 'domain': 'rs.dev', // Our domain is example.com 'language': 'en' // We want English item descriptions }) if (fs.existsSync('polldata.json')) { manager.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) { manager.setCookies(cookies, function (err) { if (err) { log.debug(err) process.exit(1) // Fatal error since we couldn't get our API key return } console.log('[BOT] The Bot has logged in!') // client.chatMessage(admin1, '[BOT] Successfully logged in!') client.setPersona(5) }) community.setCookies(cookies) community.startConfirmationChecker(30000, config.identity_secret) }) client.on('friendMessage#' + admin1, function (steamID, message) { console.log('[SERVER] admin1 to Bot: ' + message) if (message.indexOf('/code') === 0) { client.chatMessage(admin1, 'Code :' + SteamTotp.generateAuthCode(config.shared_secret)) } }) manager.on('newOffer', function (offer) { var steamID64 = offer.partner.getSteamID64() log.info(`Offer #${offer.id} | Received new offer from ${steamID64}`) if (steamID64 === admin1) { offer.accept(function (err) { if (err) { log.debug(err) } else { community.checkConfirmations() log.info(`Offer #${offer.id} | Offer Accepted From Admin: ${steamID64}`) } }) } else { offer.decline() log.info(`Offer #${offer.id} | Declined offer from ${steamID64}`) } }) manager.on('receivedOfferChanged', function (offer, oldState) { console.log(`Offer #${offer.id} changed: ${TradeOfferManager.ETradeOfferState[oldState]} -> ${TradeOfferManager.ETradeOfferState[offer.state]}`) }) manager.on('sentOfferChanged', function (offer, oldState) { var itemId = offer.itemsToGive[0].assetid log.info(`Offer #${offer.id} | changed: ${TradeOfferManager.ETradeOfferState[oldState]} -> ${TradeOfferManager.ETradeOfferState[offer.state]}`) if (offer.state === TradeOfferManager.ETradeOfferState.Accepted) { request({ 'url': `${config.site_url}/my-account/change-status?id=${itemId}&offerid=${offer.id}&status=${TradeOfferManager.ETradeOfferState[offer.state]}` }, function (error, response, body) { if (error) { log.debug(`Offer #${offer.id} | Error: ${error}`) } else { log.info(`Offer #${offer.id} | Response : ${body}`) } }) } }) community.on('confKeyNeeded', function (tag, callback) { var time = Math.floor(Date.now() / 1000) callback(null, time, SteamTotp.getConfirmationKey(config.identity_secret, time, tag)) }) manager.on('pollData', function (pollData) { fs.writeFileSync('polldata.json', JSON.stringify(pollData)) }) community.on('debug', console.log) // make web server here var app = express() app.use(bodyParser.json()) app.get('/', function (req, res) { res.send('FucK bhanu') }) // escrowhold function app.get('/ping', function (req, res) { res.status(200).send('pong') }) app.post('/escrowhold', function (req, res) { var tradelink = req.body.tradelink var offer = manager.createOffer(tradelink) offer.getUserDetails(function (err, me, them) { if (!err) { res.status(200).json({ 'escrowDays': them.escrowDays }) return } else { log.debug(err) res.status(400).json({ 'error': err }) return } }) }) // send offer app.post('/send-offer', function (req, res) { var tradeToken = req.body.trade var sid = new SteamID(req.body.steamid) var itemID = req.body.item_id var Message = 'Bhanu is fag' var offer = manager.createOffer(sid, tradeToken) var item = {'assetid': itemID, 'appid': 730, 'contextid': 2} offer.addMyItem(item) offer.setMessage(Message) offer.send(function (err, status) { if (err) { res.status(400).json({ 'error': err }) return } if (status === 'pending') { // We need to confirm it log.info(`Offer #${offer.id} | sent, but requires confirmation`) community.acceptConfirmationForObject(config.identity_secret, offer.id, function (err) { if (err) { res.status(400).json({ 'error': err }) } else { log.info(`Offer #${offer.id} | confirmed`) res.status(200).json({ 'offerid': offer.id }) } }) } else { log.info(`Offer #${offer.id} | sent successfully`) res.status(400).json({ 'offerid': offer.id }) } }) }) app.listen(port) console.log('Listening at http://localhost:' + port)
  19. I have a code to obtain cookies: community.login({ ... login data ... }, function(err, sessionID, cookies, steamguard){ fs.writeFileSync("cookies.json", JSON.stringify(cookies)); }) (Sorry for this format of code, writing post from phone. And to be clear i am receiving any login error) Then i take cookies file and proceed to the main app. manager.setCookies(cookies, function(err){ if(err){ throw err; // getting Not Logged In } ... }); (manager object is being set at the start of the code) why manager.setCookies requires to be logged in, when i am providing valid cookies?
  20. When i using method logOff() for steam bot. this event 'sessionExpired' emitted continuously. How stop this. I want logOff() completed as i click logout on steam client . Thank !
  21. Hi, so ive did something like this: var community = new SteamCommunity(); var ReadLine = require('readline'); var rl = ReadLine.createInterface({ "input": process.stdin, "output": process.stdout }); function login(accountName, password, authCode) { community.login({ "accountName": accountName, "password": password, "authCode": authCode }, function(error, sessionId, cookies, steamguard) { if (error && error.message === "SteamGuard") { console.log("An email has been sent to your address at " + error.emaildomain); rl.question("Steam Guard Code: ", function(code) { login(accountName, password, code); }); } }); } is it possible to relogin without using the new steam guard code? like i dont want to type the code everytime i relogin. P.S. i need steam guard enabled
  22. How do I change IP for steamcommunity node? var SteamCommunity = require('steamcommunity'); var SteamTradeOffers = require('steam-tradeoffers'); var community = new SteamCommunity({localAddress: '127.0.0.1'}); // not working var offers = new SteamTradeOffers({localAddress: '127.0.0.1'});
  23. I looked over the code and everything and found this: request(this, "conf", key, time, "conf", null, false, function(err, body) { I dont see any link whatsoever, when I trace back the request function to index.html theres no link either. Please help me
  24. 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
×
×
  • Create New...