Closed Wolterhon closed 7 years ago
Make sure mypartnersteamid
is a SteamID64 string.
Ugh, when sending a trade offer there is a steam error 26. What can I do?
This response code suggests that one or more of the items in this trade offer does not exist in the inventory from which it was requested.
Ugh, I really don't understand... The item exists in my inventory.
http://steamcommunity.com/id/cubsonyt/inventory/#730_2_10784182205
offers.makeOffer ({ partnerSteamId: '76561198000501285', accessToken: "...", itemsFromMe: [ { appid: 730, contextid: 2, amount: 1, assetid: 10784182205 } ], itemsFromThem: [], message: 'test' }, function(err, response) { if (err) { throw err; } console.log(response); });
OMG, assetid needs to be in ""...
My code: `var Steam = require('steam'); var SteamWebLogOn = require('steam-weblogon'); var SteamTotp = require('steam-totp'); var getSteamAPIKey = require('steam-web-api-key'); var SteamTradeOffers = require('steam-tradeoffers');
var logOnOptions = { account_name: 'mylogin', password: 'mypassword', two_factor_code: SteamTotp.generateAuthCode('AVBpV71j0Ds0smNih9FfHEbQuxk=') };
var steamClient = new Steam.SteamClient(); var steamUser = new Steam.SteamUser(steamClient); var steamFriends = new Steam.SteamFriends(steamClient); var steamWebLogOn = new SteamWebLogOn(steamClient, steamUser); var offers = new SteamTradeOffers();
steamClient.connect(); steamClient.on('connected', function() { steamUser.logOn(logOnOptions); });
steamClient.on('logOnResponse', function(logonResp) { if (logonResp.eresult === Steam.EResult.OK) { console.log('Logged in!'); steamFriends.setPersonaState(Steam.EPersonaState.Online); steamWebLogOn.webLogOn(function(sessionID, newCookie) { getSteamAPIKey({ sessionID: sessionID, webCookie: newCookie }, function(err, APIKey) { offers.setup({ sessionID: sessionID, webCookie: newCookie, APIKey: APIKey }); //write here ../ offers.makeOffer ({ partnerSteamId: mypartnersteamid, accessToken: "tradetoken", itemsFromMe: [ { appid: 730, contextid: 2, amount: 1, assetid: 10639479325 } ], itemsFromThem: [], message: 'test' }, function(err, response) { if (err) { throw err; } console.log(response); });; }); }); } });`
And it returns this error: