JAHMCR Posted April 16, 2024 Report Posted April 16, 2024 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 Quote
JAHMCR Posted April 16, 2024 Author Report Posted April 16, 2024 Just replaced "SteamID.fromIndividualAccountID(76561198024816553)" with "76561198024816553" for testing and it worked fine, was I using "SteamID.fromIndividualAccountID()" wrong? Quote
Dr. McKay Posted April 16, 2024 Report Posted April 16, 2024 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). Quote
JAHMCR Posted April 16, 2024 Author Report Posted April 16, 2024 (edited) Got it, thanks for the information! Edited April 16, 2024 by JAHMCR 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.