Jump to content
McKay Development

getUserInventoryContents always returning 401


Recommended Posts

Hey! I'm getting 401 every time I try to call this function to get an user inventory, any ideas of what could be wrong?

getUserInventoryContents(440, 2, true, SteamID.fromIndividualAccountID(76561198024816553))

This is the console error log

Error: HTTP error 401
    at SteamCommunity._checkHttpError (/Users/user/Desktop/SteamTradeBot/node_modules/steamcommunity/components/http.js:108:9)
    at Request._callback (/Users/user/Desktop/SteamTradeBot/node_modules/steamcommunity/components/http.js:50:61)
    at self.callback (/Users/user/Desktop/SteamTradeBot/node_modules/request/request.js:185:22)
    at Request.emit (node:events:518:28)
    at Request.emit (node:domain:488:12)
    at Request.<anonymous> (/Users/user/Desktop/SteamTradeBot/node_modules/request/request.js:1154:10)
    at Request.emit (node:events:518:28)
    at Request.emit (node:domain:488:12)
    at Gunzip.<anonymous> (/Users/user/Desktop/SteamTradeBot/node_modules/request/request.js:1076:12)
    at Object.onceWrapper (node:events:632:28) {
  code: 401
}

The function "getInventoryContents" works fine though.

Thanks

Link to comment
Share on other sites

2 hours ago, JAHMCR said:

Just replaced "SteamID.fromIndividualAccountID(76561198024816553)" with "76561198024816553" for testing and it worked fine, was I using "SteamID.fromIndividualAccountID()" wrong?

Yes, 76561198024816553 is a full SteamID, not an account ID. An account ID is what you see in a [U:1:46143802] ID (46143802 is the account ID).

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...