A Python-based Steam Guard authenticator that generates time-based one-time passwords (TOTP) and manages trade confirmations for multiple Steam accounts.
- Generate Steam Guard codes for multiple accounts simultaneously
- Real-time code generation with countdown timer
- Automatic token refresh when expired
- Trade confirmation management (approve/deny)
- Support for multiple account types (trades, market listings, etc.)
- Cross-platform support (Windows, macOS, Linux)
- Python 3.7+
- Dependencies listed in
requirements.txt
- Clone the repository:
git clone https://github.com/yourusername/SteamAuthenticator.git
cd SteamAuthenticator- Install required dependencies:
pip install -r requirements.txt- Create a
maFilesdirectory in the project root:
mkdir maFiles- Add your Steam Guard
.maFilefiles to themaFilesdirectory. These files should be named with your Steam ID (e.g.,76561199059431362.maFile).
Run the main authenticator:
python SteamGuard.pyIf no accounts are configured, you'll be prompted to add one automatically.
The authenticator displays:
- Account username and Steam ID
- Current Steam Guard code (refreshes every 30 seconds)
- Progress bar showing time until next code
- Remaining seconds
Available Commands:
- Press
Ctrl+Cto exit - Type
2+ Enter to add a new account - Type
3+ Enter to manage trade confirmations
You can add accounts in two ways:
Option 1: From the main interface
- Run
python SteamGuard.py - Type
2and press Enter - Follow the setup wizard
Option 2: Run the script directly
python add_account.pySetup Process:
- Enter your Steam username and password
- If Email Steam Guard is enabled, you'll be guided to disable it first
- Write down your revocation code (CRITICAL - save this!)
- Verify you saved the revocation code
- Enter the SMS code sent to your phone
- Account is added and ready to use
Requirements:
- Account must NOT already have Mobile Authenticator enabled
- Must disable Email Steam Guard if enabled (script will guide you)
- Access to phone for SMS verification
- Valid Steam credentials
While the authenticator is running, type 3 and press Enter to access confirmations:
- View all pending confirmations across accounts
- Approve or deny individual confirmations
- Approve or deny all confirmations at once
- See verification codes for trade safety
To manually refresh expired tokens for all accounts:
python refresh_all_accounts.pyThis script will:
- Check token expiration status for each account
- Automatically refresh expired tokens using stored credentials
- Update
.maFilefiles with new tokens
Edit the credentials_map dictionary in refresh_all_accounts.py to add your account credentials:
credentials_map = {
'username1': ('username1', 'password1'),
'username2': ('username2', 'password2'),
}- Keep your
.maFilefiles secure and never commit them to version control - The
maFilesdirectory is included in.gitignoreby default - Store credentials securely and consider using environment variables for sensitive data
- This tool requires your Steam credentials for token refresh functionality
SteamAuthenticator/
├── SteamGuard.py # Main authenticator script
├── add_account.py # Add new account with authenticator
├── refresh_all_accounts.py # Token refresh utility
├── requirements.txt # Python dependencies
├── maFiles/ # Directory for .maFile files (not tracked)
└── README.md # This file
The authenticator uses the Steam Web API to:
- Sync with Steam servers for accurate time
- Generate TOTP codes using HMAC-SHA1 algorithm
- Manage authentication sessions with JWT tokens
- Handle trade confirmations through Steam Community API
If you see token expiration errors, run the refresh script:
python refresh_all_accounts.pyEnsure your .maFile files are properly formatted and located in the maFiles directory.
If you get an error about Email Steam Guard being enabled:
- Go to https://store.steampowered.com/twofactor/manage
- Look for "Login Confirmation" or "Confirmación de inicio de sesión"
- Click "Remove Security Method" or "Eliminar método de seguridad"
- Confirm the removal
- Run the add account script again
- Make sure you're entering the code quickly (they expire)
- The code should be 5 digits
- If it fails, wait for a new SMS and try again
- Check that your phone number is correct on your Steam account
Common issues:
- Account already has authenticator: Remove it first at https://store.steampowered.com/twofactor/manage
- Email Steam Guard enabled: Follow the steps above to disable it
- Wrong credentials: Double-check your username and password
- Rate limited: Wait a few minutes and try again