All Activity
- Past hour
-
community.getConfirmations failed because new popup from Steam on today
JVz replied to Nguyen's topic in node-steamcommunity
works fine, dont forget to change logger to console output or logger of your choice and community to your node-steamcommunity instance let tradeOfferAcknowledged = false; const acknowledgeTradeOffer = function(sessionId=null, callback) { try { if (tradeOfferAcknowledged) { const error = new Error('Trade offer has already been acknowledged'); logger.warn('Attempt to acknowledge trade offer that was already acknowledged'); if (callback) callback(error); return; } if (!community) { const error = new Error('Community not initialized'); logger.error('Cannot acknowledge trade offer - community not initialized'); if (callback) callback(error); return; } if (!sessionId) { sessionId = community.getSessionID(); } const options = { uri: 'https://steamcommunity.com/trade/new/acknowledge', method: 'POST', form: { sessionid: sessionId, message: 1 } }; logger.info('Acknowledging trade offer'); community.httpRequest(options, (err, response, body) => { if (err) { logger.error(`Error acknowledging trade offer: ${err}`); if (callback) callback(err); return; } // Check if response indicates success (currently Steam returns [] on success) if (response && response.statusCode === 200) { tradeOfferAcknowledged = true; logger.info(`Trade offer acknowledged successfully. Response: ${body}`); if (callback) callback(null, body); } else { const error = new Error(`Unexpected response from Steam: ${response ? response.statusCode : 'unknown'}`); logger.error(`Failed to acknowledge trade offer: ${error.message}. Response body: ${body}`); if (callback) callback(error); } }, 'acknowledgeTradeOffer'); } catch (error) { logger.error(`Error acknowledging trade offer: ${error}`); if (callback) callback(error); } }; - Today
-
Hello everyone! Due to recent update I tried implementing buy order confirmation and I failed (partly)😞. I came here to ask for help because It seems I can't understand why my code runs into the problems. here are the pieces of my code: function getCookiesHeaders(contentLength, cookiesStr, itemName, game) { return { Accept: "*/*", "Accept-Encoding": "gzip, deflate, br, zstd", "Accept-Language": "en-US,en;q=0.9", Connection: "keep-alive", "Content-Length": contentLength, "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8", Cookie: cookiesStr, Host: "steamcommunity.com", Origin: "https://steamcommunity.com", Referer: `https://steamcommunity.com/market/listings/${ GAME_IDENTIFIERS[game] }/${encodeURI(itemName)}`, "Sec-Fetch-Dest": "empty", "Sec-Fetch-Mode": "cors", "Sec-Fetch-Site": "same-origin", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36", "sec-ch-ua": '"Google Chrome";v="138", "Not)A.Brand";v="8", "Chromium";v="138"', "sec-ch-ua-mobile": "?0", "sec-ch-ua-platform": '"Windows"', }; } function getParamsWithFee(cookies, priceInfo) { const { converted_price: subtotal, converted_fee: fee } = priceInfo; return { sessionid: cookies.sessionid, currency: 18, subtotal, fee, total: fee + subtotal, quantity: 1, billing_state: "", save_my_address: 0, confirmation: 0 }; } function generateListingIdLink(listingId) { return "https://steamcommunity.com/market/buylisting/" + listingId; } async function buyItem(itemName, priceDetails, listingId, game, buyingCookies) { // all these params are fine const confData = { identitySecret: "myIdentitySecretFromMyFile", steamId: "mySteamIdFromMyFile", cookies: buyingCookies }; const { cookies, cookiesStr } = getStrObjCookies(buyingCookies); const params = getParamsWithFee(cookies, priceDetails); const { bodyParams, contentLength } = getSearchParamsData(params); const headers = getCookiesHeaders(contentLength, cookiesStr, itemName, game); const sendBuyReq = async () => { try{ const response = await axios.post(generateListingIdLink(listingId), bodyParams, { headers, validateStatus: (statusCode) => { return statusCode <= 400 || statusCode === 406}}) // validateStatus needs to be done because axios thinks that 406 statusCode here is error and it falls into catch scope console.log('Response status:', response.status); return response; }catch(err){ console.log(err.message, "--errorMsg--"); throw err; } } try { const { data } = await sendBuyReq(); // that's fine it works great. From SDA it's clearly visible that the buy order is set. // I tried here await waitTime(2) so my buy information could get in time to the servers. await confirmBuyListing(confData); // The problem might be right here but it's unlikely because by itself it works await waitTime(1); // I tried increasing time from 1 sec to 2 secs. bodyParams.set("confirmation", data.confirmation?.confirmation_id); // updataing params with confirmationId to send new buyLink() const { data: finalizedData } = await sendBuyReq(); // THE MAIN PROBLEM IS HERE if (finalizedData.success === 22) console.log(finalizedData); // testing } catch (err) { console.log(err); } } I tried checking for confirmation_id and it's fine. Left that just as bodyParams.set("confirmation", data.confirmation?.confirmation_id); I think that line with "// THE MAIN PROBLEM IS HERE" is main part because when I make request it shows "status:502" but the original repetitave steam request shows "status:406" And this is the part where I can't understand why I get 502 code in my code. If needed I will add confirmBuyListing function for clarification. Shortly I tested the function with browser manual buying and it confirmed and I bought the item Despite what I wrote above my second thought would be, the problem lies within both confirmation function and buyLink function. I've seen 3 diffrent projects that this confirmation logic was implemented in: C#, JS, PYTHON and I chose python approach because pythonists have already confirmed that they solved this confirmation problem so I tried to follow their solution (this solution could be found in steamPy issues on git). I don't know what is the cause of that status 502. I did almost everything I prayed and cursed and still can't find the cause of that. I am not giving up on this but the only thing I am looking here is help😰😰 *Possible solution is to run python solution directly in my js file from pythonists (the last thing I wanna do). P.S. I hope I made it clear if not let me know. UPD: I tried sending the second post request by itself and it give the exact response so for now i am 90% sure that second request is missing something
-
community.getConfirmations failed because new popup from Steam on today
JVz replied to Nguyen's topic in node-steamcommunity
also did anyone find the way to know if item is still protected or trade finalized? Clicking "acknowledge and close" sends post request: url: https://steamcommunity.com//trade/new/acknowledge body: sessionid=YOURSESSIONID&message=1 -
Shokhboz joined the community
- Yesterday
-
Can't find consistent way to reproduce but got same behaviour again. I disabled my relog to let bot reconnect using autorelog Received disconnected event from steam user eresult=3 msg=NoConnection but didn't get error from steam user. 2 hours later still steamID is null. After restarting bot connected just fine
-
While I was experimenting with the addToCasket() and removeFromCasket functions, I noticed that when I wanted to move larger amounts of items only 10 of them where actually moved. Is this because the GC can only handle 10 move actions simoultaneously or is this a f*up on my side?
-
Do you have some way to reproduce this? Checking whether steamID is set on a timer is not the proper way to reconnect. This would run you into problems if SteamUser is currently attempting to connect but isn't yet logged on. You only need to call logOn() when your bot starts up, and if the error event is emitted.
- Last week
-
looks like sometimes client.steamID is null even when steam-user is logged in
-
My bot checks every 10 minutes for client.steamID property and if its null I'm trying to relog with client.logOn but loggin on produces this errors: client error Error: LogonSessionReplaced steam user error: {"eresult":34} I'm also checking for client.publicIP and it is undefined when steamID is null I was thinking it can be issues with connection, so I've tried to check 5 times with 5 sec intervals before relogging and every time client.publicIP is undefined and client.steamID is null but after that bot relogs just fine with LogonSessionReplaced error, so I assume connection is okay
-
How to confirm bought items with steam-tradeoffer-manager?
Wolvi replied to Wolvi's topic in node-steam-tradeoffer-manager
Solution was found, nevermind🦾 -
Hello everyone, Do you guys know what data? and access to what gives this API token? - I know that you are able to get trade history out of this - but I wasnt able to find any docs - anyone any docs any info? Thanks! https://steamcommunity.com/pointssummary/ajaxgetasyncconfig
-
Hello, few days ago my own sticker bot stopped working because after new steam trading restrictions there is need to accept each bought offer on steam app The problem is that i use SDA instead of mobile app and it seems that without another update the issue with confirmation won't be fixed Therefore i would like to inquire if there are any known endpoints or function in steam-tradeoffer-manager with which i could automate confirmation on my own Thanks in advance!
-
igor started following Trading and Escrow -- Mobile Trade Confirmations
-
igor reacted to a post in a topic: Trading and Escrow -- Mobile Trade Confirmations
-
It's the same for everyone.
-
Thanks for the quick reply, the dict I use to identify the items seems to be using different def_index'. I'll try it with the items_game.txt. Is the items_game.txt file different on a per user basis or is it the same for everyone?
-
dcv reacted to a post in a topic: My proxy provider forbids access to https://checkout.steampowered.com/login/settoken
-
def_index tells you what an item is (which weapon, which case, etc) and paint index tells you what skin an item is. Everything you need is in items_game.txt in the game's vpk files.
- Earlier
-
Hello, I want to index all Items in my inventory and dump the inventory contents in a csv file with their Item-ID, Name, Float and for non unique items(like cases and stickers) their quantity. For that I need a way to retrieve information about the item with the information I get from the node-globaloffensive inventory dump. For regular skins this isn't a problem as I can just lookup the paint_index in a collection like https://github.com/ByMykel/CSGO-API. But I dont know how to index items that aren't regular skins and dont have a paint_index. I assume that the data in the attribute array contains some information that can identify the items, but I dont know how to decode it. { "attribute": [ { "def_index": 113, "value": null, "value_bytes": { "type": "Buffer", "data": [ 166, 6, 0, 0 ] } }, { "def_index": 232, "value": null, "value_bytes": { "type": "Buffer", "data": [ 44, 0, 0, 0 ] } }, { "def_index": 233, "value": null, "value_bytes": { "type": "Buffer", "data": [ 7, 0, 0, 0 ] } } ], "equipped_state": [], "id": "22031624191", "account_id": 1180673465, "inventory": 8, "def_index": 1349, "quantity": null, "level": null, "quality": 4, "flags": 8, "origin": 24, "custom_name": null, "custom_desc": null, "interior_item": null, "in_use": null, "style": null, "original_id": null, "rarity": 1, "position": 8, "stickers": [ { "slot": 0, "sticker_id": 1702, "wear": null, "scale": null, "rotation": null, "offset_x": null, "offset_y": null } ] }
-
Pablo joined the community
-
Hello, I was trying to use a proxy server in LoginSession. But for some reason I kept getting CONNECT 403 Forbidden. After confirming that in fact the proxy works on steamcommunity.com domain I started digging on what is the problem. And after couple of hours I found out that only requests to https://checkout.steampowered.com/login/settoken url in transfer_info field of finalizelogin endpoint response is getting forbidden whilst all of other domains work flawlessly. I'm not using any of those cookies for that checkout domain. Is it okay if I manually skip the finalization for this domain(by patching the package so it immediately returns if the domain matches?) Won't there be any problems with this? UPDATE: It seems that my proxy provider also blocking api.steampowered.com, so I might need to use a different provider. But still good to get an answer for the question above.
-
dcv joined the community
-
Hmm... That's an interesting piece of information. The only thing I knew was if you get rid of that restriction steam server let you have responses with the appropriate currency setting "...¤cy=<currencyCode>&..." and if you have that restriction, items from steamcommunity would have their country currency that this item was set in. Thx for your response.
-
I believe webTradeEligibility is basically just a cache of your trading eligibility status for display purposes on the market. Rather than run the backend checks to generate this message every time you load the page, they just run the check once and then set the cookie for display. The backend checks still get run when you attempt to actually complete a purchase or trade though; you can't bypass restrictions just by fudging the cookie.
-
igor started following webTradeEligibility cookie and its purpose
-
Hi👋! I am not sure why does steam need webTradeEligibility cookie? (for steamcommunity) In case of sessionId, steamLoginSecure, steamCountry it's clear for me that without the ones steam would not allow me to fetch their data not many time (~20 reqs per min (not sure of that😅)). In general: does steamcommunity use only three of these I mentioned above or steamcommunity.com domain uses: webTradeEligibility, timezoneOffset, cookieSettings, browserid, steamDidLoginRefresh in addition mentioned ones? This question had happened because of my regular steam response errors with cookies (sessionId, steamLoginSecure, steamCountry) using axios (some times with different web proxies). link I used these cookies with: https://steamcommunity.com/market/listings/730/${SkinName}/render/?query=&start=0&count=10&country=UA&language=russian¤cy=18 steamcommunity.com/market/listings/730/AK-47 | Neon Revolution (Field-Tested)/render/?query=&start=0&count=10&country=UA&language=russian¤cy=18 In addition to that I was sure that steam sends response errors because of my multiple reqs or mb there was something on their server side so tried to reproduce the same response errors but using my browser with logged account and the link above, all of that testing left me currious because the responses were perfect, by "perfect" I mean I had no errors at all and response was always "{"success":true,...". And again why does it happen? Thx in advance.
-
Erikino joined the community
-
dreamscached started following [Solved] HTTP 400 on getInventoryContents
-
Hello. I'm using getInventoryContents from node-steamcommunity to get my bot's inventory, game ID 730, context ID 2, also using language set to 'english', and I keep getting HTTP 400 error when invoking that method. While debugging, I narrowed it down to this endpoint call: https://steamcommunity.com/inventory/765611988xxxxxxxx/730/2?l=english&count=5000 The query part is what seems to cause issues, removing it returns JSON content as expected. P.S. Solved, needed an update.