Jump to content
McKay Development

Uses of steam-user


metuero

Recommended Posts

Hi,

I'm a little confused about the uses of steam-user. I'm creating a trade site and for the bot I'm using steam-client/steam-user/etc without problems. But in the website, I need get the info of a logged users into Steam for example their avatars. Is a good idea use steam-user for this kind of functionalities or I need other package that wrap the Steam Web Api like steam-web?

 

Thanks.

Link to comment
Share on other sites

You can use getPersonas to get persona data. Off the top of my head (this might not work), getting an avatar URL would go something like this:

user.getPersonas(["76561198006409530"], (personas) => {
    var hash = personas["76561198006409530"].avatar_hash.toString('hex');
    var url = "https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/" + hash.substring(0, 2) + "/" + hash + "_full.jpg";
});
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...