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. Hello together with a friend are planning to start your own roulette to CS: GO. However, I encountered one problem, when I turn on the bot, he can not log in to your account and shows an error SteamAuthorizationError. Does anyone know what could be wrong ? Secret code and identity code i checked a million times. What could be more wrong. http://m.imgur.com/Bfmjd3F,m4LiYIA
  2. Do you know what happened with IEconItems? Already second day this interface does not work
  3. 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?
  4. 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.
  5. 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.
  6. 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
  7. 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
  8. hi Doc! i'm calling steamcommunity.acceptConfirmationForObject with the offer id and getting a 429 back. i'm also running steamcommunity.startConfirmationChecker but on a slow schedule (once every 2 minutes) - this is to catch any possibly failed confirmations. the code works in a debug environment, the 429 is only in production (not surprisingly). the weird thing is that all outstanding confirmations go through when the automatic confirmation checker runs, just not the acceptConfirmationForObject call which return 429s every time. i'm using steam-tradeoffers.makeOffer to create the offers and then call acceptConfirmationForObject in makeOffer's callback is it possible that the problem is both calls are made to the web api too quickly? should i put the acceptConfirmationForObject on a timeout? any ideas welcome! ~bp
  9. 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 ;/
  10. 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
  11. 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.
  12. 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.
  13. 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)
  14. 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
  15. 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?
  16. 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 !
  17. 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
  18. 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'});
  19. 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
  20. Hi. I have bot and everything was fine until yesterday. This code is never called community.on('confKeyNeeded', function (tag, callback) { console.log("generirane na kluch"); callback(null, time, SteamTotp.getConfirmationKey(account.identity_secret, time(), tag));}); community.on('newConfirmation', function (confirmation) { console.log("doide nova oferta"); var time = time(); var key = SteamTotp.getConfirmationKey(account.identity_secret, time, 'allow'); confirmation.respond(time, key, true, function (err) { if (err) { console.log("neshto stana s ofertata" + err); return; } });}); This is my login function login(err, sessionID, cookies, steamguard) { if (err) { if (err.message == "SteamGuardMobile") { account.twoFactorCode = SteamTotp.generateAuthCode(account.shared_secret); setTimeout(function () { community.login(account, login); }, 5000); return; } process.exit(0); } account.sessionID = sessionID; account.cookies = cookies; community.getWebApiKey('website.com', webApiKey); community.startConfirmationChecker(60000, account.identity_secret); console.log("startira logina ama nakraq debug" + account.identity_secret);} I change limit to 60000 and same problem. Anyone know if steam changed something ?
  21. Can I get sticker name by value or float_value { "defindex": 113, "value": 1063, "float_value": 1.4895802675772805e-042 } in GetPlayerItems? I found this: "1063" { "name" "columbus2016_team_fntc" "item_name" "#StickerKit_columbus2016_team_fntc" "description_string" "#StickerKit_desc_columbus2016_team_fntc" "sticker_material" "columbus2016/fntc" "item_rarity" "rare" "tournament_event_id" "9" "tournament_team_id" "6" } But in this API has no name and no image of the sticker
  22. I'm writing a SteamBot to send offers to different accounts and to automatically confirm these offers after this. But I'm getting 'Error: Could not act on confirmation' when trying to respond to every confirmation. Can you suggest what am I doing wrong? Here is how I'm using steamcommunity (I'm using babel to transpile all of this into ES5): class SteamBot { // this class has a login function, which logs bot in, // and also some fields like 'shared' and 'identity' // this.community is a SteamCommunity object confirmAll() { return new Promise((res, rej) => { const time = Math.floor(Date.now() / 1000) const key = SteamTotp.getConfirmationKey(this.identity, time, 'conf') this.community.getConfirmations(time, key, async (err, confirmations) => { if (err) return rej(err) log(confirmations.map(JSON.stringify).join(', ')) // just for debugging for (let confirmation of confirmations) { try { const confirmRes = await this.confirmConfirmation(confirmation) log(`Confirmed ${confirmation.creator}`, true, true) } catch (e) { log(`Confirmation failed: ${e}`, true, true) return rej(e) } } return res(confirmations) }); }) } confirmConfirmation(confirmation) { return new Promise((res, rej) => { const time = Math.floor(Date.now() / 1000) const key = SteamTotp.getConfirmationKey(this.identity, time, 'allow') console.log(this.identity) // for debugging purposes console.log(confirmation) // also for this confirmation.respond(time, key, true, (err) => { if (err) return rej(err) return res() }) }) } constructor(login, password, shared, identity) { this.login = login this.password = password this.shared = shared this.identity = identity this.loginBot() // logging in, not necessary for now, since it's working okay } } var bot = new SteamBot(login, password, shared, identity) // and after logging in and sending tradeoffer, I'm trying to do this: bot.confirmAll()I've tried to send offer to my other account and to confirm it immediately, and after that call bot.confirmAll(). It shows that I have confirmations, but when I try to respond to them, it shows an error: 'Could not act on confirmation'. I'm pretty sure that I'm using the right identity_secret (since I've used it with startConfirmationChecker() and everything worked fine, also I console.log()'ed it inside a function just to make sure it's the right one and yes, it's the right one). I'm not sure what I did wrong, I've seen an example that worked pretty much the same (well, without Promises and ES6 stuff, but still), so if you know what could I do wrong, can you suggest me? Thanks in advance.
  23. Please change your loadUserInventory function like this https://www.reddit.com/r/SteamBot/comments/5he94k/psa_there_is_a_new_endpoint_for_fetching_user/
×
×
  • Create New...