1099511627776
1099511627776

Reputation: 176

steamcommunity does not return error code

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?

Upvotes: 0

Views: 443

Answers (2)

Dr. McKay
Dr. McKay

Reputation: 2977

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).

Upvotes: 1

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

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

key is argument for response function

Upvotes: 0

Related Questions