0

I'm using node-steamcommunity to get user's inventory The module responded "[Error: malformed response]" After doing some debugging I've managed to see the raw response from steamcommunity server (request to: https://steamcommunity.com/profiles/STEAM_ID/inventory/json/570/1/): The response is

{"success": false}

The problem is that the normal response should contain the error like this:

{"success": false, "Error": "The profile is private"}

So now I can neither get the user's inventory nor the reason why I can't do this. Could some one point me to the right way of getting the user's inventory from steam

Update:

after doing some investigation I've found something interesting:

  1. When I login as a normal user, i get a sessionid.
  2. With that key I can access to profile inventory
  3. When I start bot I get also get sessionId but when I'm trying to request with bot's session id I get the { success: false} response without any explanation.

Does anyone has an idea what is wrong?

1099511627776
  • 176
  • 1
  • 18

2 Answers2

1

1 is not a correct contextid for Dota 2 (570).

You're looking for https://steamcommunity.com/profiles/STEAM_ID/inventory/json/570/2/ (notice the 2 at the end instead of 1).

Dr. McKay
  • 2,727
  • 2
  • 15
  • 19
0

You tried accepting trade? If yes then maybe need use:

let key = SteamTotp.getConfirmationKey(identity_secret, time, 'allow');

key is argument for response function

  • No, i did not try to accept the trade yet, I just want to see if my friends items list, after thatI will make a decision to make the trade or not – 1099511627776 Jun 23 '16 at 18:55