All Activity
- Last week
-
charly joined the community
-
Hi, I am trying to auto craft Vaccinators on start and when a new trade offer is accepted. // craftVaccinators.ts import Bot from '../../Bot'; export default function craftVaccinators(bot: Bot): Promise<void> { return new Promise(resolve => { if (!bot.options.crafting.weapons.enable) { return resolve(); } const inventory = bot.inventoryManager.getInventory; const quickFix = inventory.currenciesFindBySKU('411;6'); const reclaimed = inventory.currenciesFindBySKU('5001;6'); const amountToCraft = Math.min(Math.trunc(quickFix.length / 3), reclaimed.length); for (let i = 0; i < amountToCraft; i++) { bot.tf2gc.craftVaccinators(); } return resolve(); }); } I am calling craftVaccinators at onReady and onTradeOfferChanged // MyHandler.ts if (this.isCraftingManual === false) { // Smelt / combine metal keepMetalSupply(this.bot, this.minimumScrap, this.minimumReclaimed, this.combineThreshold); // Craft duplicate weapons craftDuplicateWeapons(this.bot) .then(() => { return craftClassWeapons(this.bot).then(() => { return craftVaccinators(this.bot); }); }) .catch(err => { log.warn('Failed to craft duplicated craft/class weapons', err); }); } Which create jobs handled by handleCraftVaccinators // TF2GC.ts private handleCraftVaccinators(job: Job): void { const inventory = this.bot.inventoryManager.getInventory; const assetids1 = inventory.findBySKU('411;6', true).filter(assetid => !this.bot.trades.isInTrade(assetid)); const assetids2 = inventory.findBySKU('5001;6', true).filter(assetid => !this.bot.trades.isInTrade(assetid)); if (assetids1.length < 3 || assetids2.length < 1) { return this.finishedProcessingJob(new Error("Can't process job")); } const ids = [...assetids1.splice(0, 3), ...assetids2.splice(0, 1)]; log.debug('Sending vaccinator craft request'); this.bot.tf2.craft(ids); const gainSKU = '998;6'; this.listenForEvent( 'craftingComplete', (recipe: number, itemsGained: string[]) => { log.debug('itemsGained', itemsGained); if (itemsGained.length > 0) { // Remove items used for recipe ids.forEach(assetid => inventory.removeItem(assetid)); // Add items gained itemsGained.forEach(assetid => inventory.addItem(gainSKU, assetid)); } this.finishedProcessingJob(); }, err => { this.finishedProcessingJob(err); } ); } My issue is that most of the time, craftingComplete is emitted but the Vaccinator has not been crafted and itemsGained is empty. Any idea what I am doing wrong ? Thanks.
-
I want to obtain information on my items for sale in a specific game on Steam Market. I am selling items for both CS2 and TF2 on the Steam Market. I have obtained some information through https://steamcommunity.com/market/mylistings, but this information is very mixed, including both my CS2 and TF2 items for sale, as well as my buy orders. I want to further filter the information by adding params to https://steamcommunity.com/market/mylistings, so that I can specifically obtain the data for my TF2 items for sale. I would greatly appreciate it if you could explain how to fill in params!
-
I have now realised what I've done wrong, it's an AuthSessionTicket, not an EncryptedAppTicket. My bad.
-
As far as I can tell, the app in question calls "GetAuthSessionTicket" from the Steam API. https://partner.steamgames.com/doc/api/isteamuser#GetAuthSessionTicket Here's the exact line where it calls this: user.GetAuthSessionTicket(array, 1024, out ticket);
-
sfwefsdHashiiiieee reacted to a post in a topic: How do I login with steam-user while steam/cs2 is open on windows?
-
Hello everyone, This forum has many extremely interesting topics, and I’ve learned a lot from them. However, I couldn’t find anything addressing the issue of how listings are sorted - for example, in the link below. Listings appear to be sorted by price, but there are clearly other variables at play because the order is often incorrect. For instance, 182.43€ appears before 181.08€, and 187.25€ comes before 178.87€, and so on. I’m using euros, but this sorting issue occurs with any currency. I’ve read before that it might be related to the different currencies used by Steam and the varying conversion rates and fees applied, but I’ve never been able to confirm this. My question is: Does anyone know more about why this happens? Is there any way to mitigate this issue? For my application, properly sorted listings would be beneficial. Link for reference: https://steamcommunity.com/market/listings/730/AK-47 | Redline (Minimal Wear)?count=100
-
joka joined the community
-
sfwefsdHashiiiieee joined the community
-
Does the app in question actually use encrypted app tickets?
-
I get the following when making an app ticket (user.createEncryptedAppTicket(appid, clientcallback)): Error: Fail at exports.eresultError (/home/nova/Desktop/imgoinginsane/node_modules/steam-user/components/helpers.js:105:12) at SteamUser.<anonymous> (/home/nova/Desktop/imgoinginsane/node_modules/steam-user/components/appauth.js:34:23) at SteamUser._handleMessage (/home/nova/Desktop/imgoinginsane/node_modules/steam-user/components/03-messages.js:643:16) at SteamUser._handleNetMessage (/home/nova/Desktop/imgoinginsane/node_modules/steam-user/components/03-messages.js:565:8) at SteamUser._processMulti (/home/nova/Desktop/imgoinginsane/node_modules/steam-user/components/03-messages.js:697:9) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) { eresult: 2 }
-
LunarN0v4 joined the community
-
Dr. McKay reacted to a post in a topic: Obtaining SteamLogin Secure Token
-
Topic is irrelevant, I found the post where steam session is explained. Thank you
- Earlier
-
I am an active Steam user and often need to access my purchase history at https://store.steampowered.com/account/history/. I was wondering if it was possible to get this information in a more automated way using the Steam API. I understand that Steam provides an API to access various information, but I can't find specific instructions or examples of how to get your purchase history. Is there a way to receive a response in json format, or in a format other than html?
-
Gabriel joined the community
-
DarkGL joined the community
-
Cookies.find is not a function
Dr. McKay replied to mariodelta's topic in node-steam-tradeoffer-manager
The first argument to webSession is sessionID, not cookies. -
SteamUs1 started following mariodelta
-
Hello! When I try to set the cookies for the Steam Trade manager I get the following error TypeError: cookies.find is not a function This is my code client.on('webSession', function(cookies) { manager.setCookies(cookies, (err) => { if(err) { console.log(err) return } console.log('cookies set!'); }) });
-
SteamUs1 joined the community
-
I am very new here and find the project really great! I myself am trying to realize a small project with steam, but for this I need the steam login secure token in addition to the session id. Is there a way for steam users to get this token? Thanks for your help!
-
Error undefined while creating a new Steam Web API Key
mariodelta replied to mariodelta's topic in node-steamcommunity
Already found out that my account is limited and this error is related to that. Need to deposit 5 dollars in order to create an API key. What's the best solution for adding the funds to my account with 2FA enabled? -
Hello! Currently, I'm trying to create a new Steam Web API Key with the steam-community package. When I try to execute the code below community.login(loginOptions, (err) => { community.createWebApiKey({ domain: 'localhost' }, function(err, result) { console.log(err, result); }) }); I will receive an Undefined Error Error: Error undefined at exports.eresultError (/Users/dkuijs/Documents/Steam Trading Bot/steam-trading-bot/node_modules/steamcommunity/components/helpers.js:57:12) at SteamCommunity.<anonymous> (/Users/dkuijs/Documents/Steam Trading Bot/steam-trading-bot/node_modules/steamcommunity/components/webapi.js:147:22) at Request._callback (/Users/dkuijs/Documents/Steam Trading Bot/steam-trading-bot/node_modules/steamcommunity/components/http.js:67:15) at self.callback (/Users/dkuijs/Documents/Steam Trading Bot/steam-trading-bot/node_modules/request/request.js:185:22) at Request.emit (node:events:520:28) at Request.<anonymous> (/Users/dkuijs/Documents/Steam Trading Bot/steam-trading-bot/node_modules/request/request.js:1154:10) at Request.emit (node:events:520:28) at Gunzip.<anonymous> (/Users/dkuijs/Documents/Steam Trading Bot/steam-trading-bot/node_modules/request/request.js:1076:12) at Object.onceWrapper (node:events:634:28) at Gunzip.emit (node:events:520:28) { eresult: undefined } undefined Does someone know what the error could be?
-
I let this script run on a new OVH VPS, so I don't think its a network issue. Couldn't ECONNRESET also be caused by the steam servers abruptly closing the connection while they are still doing their maintenance? The first econnreset it seemed to handle it fine and attempted the autoRelogin, but after it got the econreset from when it tried to reconnect it just exited I assume?
-
dawe started following HTTP error 403 when trying to relog after session expires
-
const SteamUser = require('steam-user'); const SteamCommunity = require('steamcommunity'); const TradeOfferManager = require('steam-tradeoffer-manager'); const allowedSteamID = "blabla"; const SteamTotp = require('steam-totp'); // Import the steam-totp package const webhooklink = "link" const https = require('https'); class SteamBot { constructor(logOnOptions) { const self = this; // Store the reference to 'this' this.isLoggingIn = false; // Initialize the flag to indicate log-in status this.client = new SteamUser(); this.community = new SteamCommunity(); this.manager = new TradeOfferManager({ steam: this.client, community: this.community, language: 'en', pollInterval: 30000, useAccessToken: true }); this.client.setOption('autoRelogin', true); if (logOnOptions.sharedSecret) { const twoFactorCode = SteamTotp.getAuthCode(logOnOptions.sharedSecret); logOnOptions.twoFactorCode = twoFactorCode; // Include 2FA code in logOnOptions } this.client.logOn(logOnOptions); this.isLoggingIn = true; // Set the flag to true on first login attempt this.client.on('loggedOn', () => { console.log('Logged into Steam'); this.isLoggingIn = false; // Reset flag after successful login this.client.setPersona(SteamUser.EPersonaState.Online); }); this.client.on('friendRelationship', (steamID, relationship) => { // Check if we received a friend request if (relationship === SteamUser.Steam.EFriendRelationship.RequestRecipient) { console.log(`Accepting friend request from ${steamID.getSteam3RenderedID()}`); client.addFriend(steamID); // Automatically accept the friend request } }); this.client.on('webSession', (sessionID, cookies) => { this.manager.setCookies(cookies, (err) => { if (err) { console.error('Error setting cookies for TradeOfferManager:', err); } else { console.log('Cookies set for TradeOfferManager'); } }); this.community.setCookies(cookies); this.community.startConfirmationChecker(10000, '='); }); this.community.on("sessionExpired", async function (err) { if (err) { console.log('Session Expired: ' + err); } if (!self.isLoggingIn) { self.isLoggingIn = true; // Prevent concurrent logins // Check if the bot is connected to the Steam network if (self.client.steamID) { // Checks if logged on self.client.webLogOn(); console.log('called weblogon'); } else { console.log('Bot is not connected to the Steam network. Cannot call webLogOn.'); const lop = { accountName: "", // Replace with your Steam account name password: "#", // Replace with your Steam password sharedSecret: "=" // Optional: Only if your account has 2FA enabled }; // Check if 2FA is needed, generate the 2FA code if `sharedSecret` is provided if (lop.sharedSecret) { const twoFactorCode = SteamTotp.getAuthCode(lop.sharedSecret); lop.twoFactorCode = twoFactorCode; // Include 2FA code in logOnOptions } // Attempt to log in with the provided credentials self.client.logOn(lop); self.client.once('loggedOn', () => { self.isLoggingIn = false; // Reset flag after successful re-login }); self.client.on('error', (error) => { console.error("Login error:", error.message); // Send POST request to the Discord webhook if login fails const webhookUrl = "link"; const errorMessage = `Steam Bot Login Error: ${error.message}`; // Prepare the message payload for Discord const data = JSON.stringify({ content: errorMessage }); // Parse the webhook URL const url = new URL(webhookUrl); const options = { hostname: url.hostname, path: url.pathname + url.search, method: 'POST', headers: { 'Content-Type': 'application/json', 'Content-Length': data.length } }; // Send HTTPS request to Discord webhook const req = https.request(options, (res) => { console.log(`Discord webhook responded with status: ${res.statusCode}`); }); req.on('error', (e) => { console.error(`Problem with Discord webhook request: ${e.message}`); }); req.write(data); // Write data to request body req.end(); }); } } }); this.client.on('loginKey', (key) => { logOnOptions.loginKey = key; // Store login key for future logins console.log('Login key saved for future logins:', key); }); this.manager.on('newOffer', (offer) => { console.log('Incoming trade offer received'); // Log when a new offer is received if (offer.partner.getSteamID64() === allowedSteamID) { offer.accept((err, status) => { if (err) { console.error(`Unable to accept offer: ${err.message}`); } else { console.log(`Offer accepted: ${status}`); } }); } else { console.log(`Offer from unauthorized Steam ID: ${offer.partner.getSteamID64()}`); } }); } sendDepositTrade(assetIds, unique_code, tradeLink, steamID, callback) { //const { partner, token } = this.manager.getPartnerAndToken(tradeLink); const urlParams = new URLSearchParams(new URL(tradeLink).search); const partner = urlParams.get('partner'); // Extract the partner SteamID from the URL const token = urlParams.get('token'); // Extract the token from the URL const offer = this.manager.createOffer(tradeLink); this.manager.getUserInventoryContents(steamID, 730, 2, true, (err, inv) => { if (err) { console.log('Error fetching user inventory:', err); callback(err, false); // Invoke the callback with the error } else { const itemsToAdd = inv.filter((item) => { const itemAssetId = String(item.assetid); return assetIds && assetIds.includes(itemAssetId); }); if (itemsToAdd.length > 0) { //console.log('Items found in inventory matching assetIds:', itemsToAdd); itemsToAdd.forEach((item) => { offer.addTheirItem(item); //console.log("Added item to trade offer:", item); }); offer.setMessage(`Acceptera för omedelbar utbetalning via Swish. Verifieringskoden är: ${unique_code}`); offer.send((err, status) => { console.log("offer status " + status); if (err) { console.error('Error sending trade offer:', err); callback(err, false, offer); // Invoke the callback with the error } else { callback(null, true, offer.id); // Trade sent successfully } }); } } }); } } module.exports = SteamBot; With this code I get Session Expired: Error: HTTP error 403 upon session expiry
-
Sounds like you have some network issue.
-
Got this today, during steam routine downtime: [2024-11-12T23:09:31.673Z] [W1] WebSocket disconnected with error: read ECONNRESET [2024-11-12T23:09:31.673Z] [W1] Handling connection close [2024-11-12T23:09:31.673Z] 3: NoConnection [2024-11-12T23:09:31.673Z] Disconnecting without sending logoff [2024-11-12T23:09:31.673Z] [W1] We wanted to end connection, but it's not connected or connecting [2024-11-12T23:09:31.673Z] [EBO] Queueing exponential backoff "logOn" with timeout 1000 [2024-11-12T23:09:32.692Z] API GET request to https://api.steampowered.com/ISteamDirectory/GetCMListForConnect/v0001/?format=vdf&cellid=14: 200 [2024-11-12T23:09:32.716Z] Randomly chose netfilter server 185.25.182.52:27017 (load = 28, wtd_load = 21.6530790328979492) [2024-11-12T23:09:32.716Z] [T31] Connecting to TCP CM: 185.25.182.52:27017 [2024-11-12T23:09:33.717Z] [T31] TCP connection timed out [2024-11-12T23:09:33.717Z] [T31] Ending connection and removing all listeners [2024-11-12T23:09:33.717Z] [WebAPI] Using cached value for API_GET_https://api.steampowered.com/ISteamDirectory/GetCMListForConnect/v0001/ [2024-11-12T23:09:33.719Z] Randomly chose websockets server ext1-par1.steamserver.net:27024 (load = 26, wtd_load = 20.9230833053588867) [2024-11-12T23:09:33.719Z] [W37] Connecting to WebSocket CM ext1-par1.steamserver.net:27024 [2024-11-12T23:09:35.720Z] [W37] WS connection timed out [2024-11-12T23:09:35.720Z] [WebAPI] Using cached value for API_GET_https://api.steampowered.com/ISteamDirectory/GetCMListForConnect/v0001/ [2024-11-12T23:09:35.721Z] Randomly chose websockets server ext1-par1.steamserver.net:27024 (load = 26, wtd_load = 20.9230833053588867) [2024-11-12T23:09:35.721Z] [W43] Connecting to WebSocket CM ext1-par1.steamserver.net:27024 [2024-11-12T23:09:39.723Z] [W43] WS connection timed out [2024-11-12T23:09:39.723Z] [WebAPI] Using cached value for API_GET_https://api.steampowered.com/ISteamDirectory/GetCMListForConnect/v0001/ [2024-11-12T23:09:39.725Z] Randomly chose websockets server ext1-par1.steamserver.net:27033 (load = 26, wtd_load = 23.2615313529968262) [2024-11-12T23:09:39.725Z] [W52] Connecting to WebSocket CM ext1-par1.steamserver.net:27033 [2024-11-12T23:09:47.727Z] [W52] WS connection timed out [2024-11-12T23:09:47.727Z] [WebAPI] Using cached value for API_GET_https://api.steampowered.com/ISteamDirectory/GetCMListForConnect/v0001/ [2024-11-12T23:09:47.728Z] Randomly chose websockets server ext1-par1.steamserver.net:27033 (load = 26, wtd_load = 23.2615313529968262) [2024-11-12T23:09:47.729Z] [W61] Connecting to WebSocket CM ext1-par1.steamserver.net:27033 [2024-11-12T23:09:57.730Z] [W61] WS connection timed out [2024-11-12T23:09:57.731Z] [WebAPI] Using cached value for API_GET_https://api.steampowered.com/ISteamDirectory/GetCMListForConnect/v0001/ [2024-11-12T23:09:57.733Z] Randomly chose netfilter server 185.25.182.52:27017 (load = 28, wtd_load = 21.6530790328979492) [2024-11-12T23:09:57.733Z] [T70] Connecting to TCP CM: 185.25.182.52:27017 [2024-11-12T23:10:07.733Z] [T70] TCP connection timed out [2024-11-12T23:10:07.733Z] [T70] Ending connection and removing all listeners [2024-11-12T23:10:07.733Z] [WebAPI] Using cached value for API_GET_https://api.steampowered.com/ISteamDirectory/GetCMListForConnect/v0001/ [2024-11-12T23:10:07.735Z] Randomly chose websockets server ext1-par1.steamserver.net:27019 (load = 27, wtd_load = 22.5226225852966309) [2024-11-12T23:10:07.735Z] Connecting to WebSocket CM ext1-par1.steamserver.net:27019 [2024-11-12T23:10:17.737Z] [W79] WS connection timed out [2024-11-12T23:10:17.737Z] [WebAPI] Using cached value for API_GET_https://api.steampowered.com/ISteamDirectory/GetCMListForConnect/v0001/ [2024-11-12T23:10:17.738Z] Randomly chose websockets server ext1-par1.steamserver.net:27019 (load = 27, wtd_load = 22.5226225852966309) [2024-11-12T23:10:17.738Z] [W88] Connecting to WebSocket CM ext1-par1.steamserver.net:27019 [2024-11-12T23:10:18.798Z] [W88] WebSocket disconnected with error: read ECONNRESET [2024-11-12T23:10:18.799Z] [W88] Handling connection close [2024-11-12T23:10:19.799Z] [WebAPI] Using cached value for API_GET_https://api.steampowered.com/ISteamDirectory/GetCMListForConnect/v0001/ After 23:10 it did not do anything for 2 hours, so I just ended the process.
-
Anonymous logon and getPersonas to fetch account's avatar and name
The Meg replied to The Meg's topic in node-steam-user
Indeed, I logged on as a user and it works! Thank you! -
Anonymous logon and getPersonas to fetch account's avatar and name
Dr. McKay replied to The Meg's topic in node-steam-user
Most methods don't work if you log on anonymously. getPersonas probably isn't one that does. -
The Meg started following Anonymous logon and getPersonas to fetch account's avatar and name
-
The Meg joined the community
-
Steam login/dologin "steamLoginSecure" a way to get it?
cfselin replied to Alin Tabuci's topic in General
So have you solved this problem, i really want to know how to get this steamloginsecure value in webview. It is important to me.