Baby Potato Posted May 4, 2023 Report Posted May 4, 2023 Basic and probably repetitive question here, sorry about that; I couldn't find anything on this. The documentation for TradeOfferManager.createOffer says we can pass in a trade link, but whenever I try, I get thrown an "Unknown SteamID Input Format" error. Is there a specific part of the link I need to pass into createOffer? Quote
Dr. McKay Posted May 4, 2023 Report Posted May 4, 2023 Either you're on an old version of steam-tradeoffer-manager, or your trade url isn't valid. Quote
Baby Potato Posted May 4, 2023 Author Report Posted May 4, 2023 Ahh, I see. Fixed it. Though I have another question now - if I'm getting the inventory contents of a user using the trade link & manager.getUserInventoryContents, what should I pass in as the first parameter? If I pass in the link itself, I get thrown an error. If i pass in the ID besides partner=xxxxxxxx, I get an HTTP error 404. If I pass in getUserInventoryContents("[u:1:" + accountid + "]" ...), where account ID is the partner ID in the tradelink, I also get an HTTP error 404. Quote
Dr. McKay Posted May 4, 2023 Report Posted May 4, 2023 You can either pass the steamID property from the offer, or the SteamID as you're doing in that last example, but the U needs to be capital. The ID type character is case-sensitive. So, for example, either of these will work: let offer = manager.createOffer(tradeUrl); manager.getUserInventoryContents(offer.partner, 440, 2, true, (err, inv) => { console.log(`Got ${inv.length} items`); }); // OR manager.getUserInventoryContents(`[U:1:${accountid}]`, 440, 2, true, (err, inv) => { console.log(`Got ${inv.length} items`); }); Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.