Jump to content
McKay Development

Getting the ID of the account im currently logged in with


Tayhayy

Recommended Posts

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 by Tayhayy
Link to comment
Share on other sites

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 by Tayhayy
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...