Tayhayy Posted June 5, 2021 Report Share Posted June 5, 2021 (edited) How can this be accomplished with the code I provided? var SteamCommunity = require("steamcommunity"); var account = new SteamCommunity(); let accountName = "username"; let password = "password"; account.login({ accountName: accountName, password: password, authCode: "", twoFactorCode: "", captcha: "" }, function (err) { // log customurl of the account i logged into } Edited June 5, 2021 by Tayhayy Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted June 6, 2021 Report Share Posted June 6, 2021 You want your ID or your custom url? Those are two different things. Your SteamID is available as account.steamID. To get your custom URL, you should call getSteamUser() on your own steamID and check the custom URL in the returned object. Tayhayy 1 Quote Link to comment Share on other sites More sharing options...
Tayhayy Posted June 6, 2021 Author Report Share Posted June 6, 2021 (edited) I've done this: var SteamCommunity = require("steamcommunity"); let account1 = new SteamCommunity(); let account1user = "n318UAzhS"; let account1pass = "7fdIVMpt"; account1.login({ accountName: account1user, password: account1pass, authCode: "", twoFactorCode: "", captcha: "" }, function (err) { account1.getSteamUser({ id: account1.steamID }, function (user) { console.log(user); }); }); Yet it's giving me this throw new Error("id parameter should be a user URL string or a SteamID object"); ^ Error: id parameter should be a user URL string or a SteamID object Any ideas? Edited June 6, 2021 by Tayhayy Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted June 7, 2021 Report Share Posted June 7, 2021 Get rid of the object. You should just be doing this: account1.getSteamUser(account1.steamID, function (user) { Tayhayy 1 Quote Link to comment Share on other sites More sharing options...
Tayhayy Posted June 7, 2021 Author Report Share Posted June 7, 2021 (edited) It's giving me null. Edited June 7, 2021 by Tayhayy Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted June 8, 2021 Report Share Posted June 8, 2021 My mistake, I didn't pay close enough attention to your callback. The first argument to the callback function needs to be err; the second is user. Tayhayy 1 Quote Link to comment Share on other sites More sharing options...
Tayhayy Posted June 8, 2021 Author Report Share Posted June 8, 2021 Cheers Quote Link to comment Share on other sites More sharing options...
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.