steam-badge-unlocker
v1.2.3
Published
Provides an interface to solve most quests of the Steam Community badge.
Maintainers
Readme
Steam Community Badge Unlocker for Node.js
This module extends the node-steamcommunity library with additional functionality to automate Steam community badge tasks.
It is designed for users who manage multiple Steam accounts and want to complete community-related achievements efficiently.
Note: Users with one or two accounts are encouraged to complete these tasks manually for a better Steam experience.
Installation
Install from npm:
npm install steam-badge-unlockeror with peer dependencies:
npm install steam-badge-unlocker steamcommunity steam-userConfiguration
Default configuration is located in resources/OCommunityLeaderDefault.js.
All values can be overridden when initializing the class.
const communityLeaderOptions = {
// Enables the "AddFriendToFriendsList" task when true.
// Ensures both accounts become friends by initiating a mutual friend request.
// When false, the script assumes the existing friendship should be used.
forceAddFriend: true,
forceRemoveFriend: true,
wishlistAppId: 1195460,
// To enable the YouTube linking task, link your YouTube account with Steam first:
// 1. Go to https://steamcommunity.com/my/videos/link (Profile > Videos > Link YouTube account)
// 2. Click "Access your YouTube videos" (green button)
// 3. Select your Google account when redirected to YouTube
// 4. After successful linking, Steam shows "Successfully linked your YouTube account"
// 5. In Chrome, open Developer Tools (F12) -> Application -> Storage -> Cookies -> https://steamcommunity.com
// 6. Copy the "Value" of cookies:
// - youtube_accesstoken → youtubeCookies.accessToken
// - youtube_authaccount → youtubeCookies.authAccount
// Requirements:
// - Your YouTube account must have at least one uploaded video (can be "unlisted")
// - If Steam can list your video for linking, the configuration is valid
// Note: YouTube access tokens expire periodically and must be refreshed when expired (PostVideo: false).
youtubeCookies: {
accessToken: null,
authAccount: '',
refreshToken: 'null',
},
workshopFileId: '308490450',
workshopAppId: 730,
reviewAppId: 730,
playAppId: 730,
playSeconds: 330,
// SteamUser instance for playing task
steamUser: null,
/** @type {function|null} (optional) */
log: null,
/**
* Master instance should invite limited accounts and interact with slave instances.
* @type {SteamCommunity|null} (optional)
*/
masterInstance: null,
};Usage
This library must be integrated into an existing node-steamcommunity project.
const SteamCommunity = require('steamcommunity');
const SteamBadgeUnlocker = require('steam-badge-unlocker');
const community = new SteamCommunity();
// login with community or SteamUser
// ... after login:
const badgeUnlocker = new SteamBadgeUnlocker(community);
const communityLeader = badgeUnlocker.createCommunityLeader(communityLeaderOptions);
await communityLeader.start();
// Optional: perform additional actions here
// Note: during `finish()`, the master friend will be removed if `forceRemoveFriend: true`.
// If you plan to trade or complete more tasks, insert your code between start() and finish().
await communityLeader.finish();Master / Slave Setup
In multi-account setups, one account can act as a master, coordinating multiple slave accounts.
The master account should have:
- At least one public screenshot
- Activity in the Steam feed (for rating and commenting)
- Open profile settings (public visibility)
Slave accounts will automatically:
- Add the master account as a friend (if not already)
- Post comments on the master’s profile and screenshots
- Send chat messages with emoticons
- Interact with the master’s activity feed (rate up)
The master instance invites and manages interactions between accounts using:
const masterCommunity = new SteamCommunity();
// login with community or SteamUser...
const slaveCommunity = new SteamCommunity();
// login with community or SteamUser...
communityLeaderOptions.masterInstance = masterCommunity;
const badgeUnlocker = new SteamBadgeUnlocker(slaveCommunity);
const communityLeader = badgeUnlocker.createCommunityLeader(communityLeaderOptions);Supported Tasks
Community Leader Badge (23+ automated tasks)
- Add comment on friend's profile
- Add comment on friend's screenshot
- Add friend
- Add game to wishlist
- Craft game badge (requires 1 full set of trading cards in inventory)
- Select favorite badge
- Join a group
- Post a screenshot
- Post a status
- Post a video
- Rate up content in activity feed
- Rate up workshop item
- Recommend game
- Search in discussions
- Set profile background (requires background item)
- Set avatar
- Set real name
- Subscribe to workshop item
- Use discovery queue
- View broadcast
- View guide in Steam overlay
- Play game (requires steam-user)
- Use emotion in chat (requires steam-user)
Disabled (manual or ToS-restricted):
- Trade (disabled, requires steam-tradeoffer-manager)
- Buy or Sell item on Community Market (disabled, see Steam ToS)
- Add 2FA to account (disabled)
- Add phone to account (disabled)
- Setup Steam Guard account (disabled)
This library completes 21+ tasks, reaching at least the "Community Ambassador" level.
Accounts with limited access (<5 USD spent) can complete ~13 tasks (Pillar of Community).
Banned accounts may not be eligible for all tasks.
Playing tasks require a running Steam client or steam-user.
Documentation
See full documentation on the GitHub Wiki.
Support
Report issues on the GitHub issue tracker.
License
MIT License
