Skip to content

SanteriHetekivi/steam-key-redeem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My Steam key redeeming script.

Tries to redeem list of keys to my Steam account.
If redeeming failed with error that I already own the game, then send it with Telegram bot.

Usage.

  1. Install Python.

  2. Install pip.

  3. Install required packages.

    pip install -r requirements.txt

  4. Create Telegram bot.

  5. Add bot to Telegram channel.

  6. Create .env-file.

  7. Run script with Steam keys as arguments seperated by space.

    python main.py <Steam key> <Steam key 2>

  8. Login to Steam account.

.env-file

Name Description
TELEGRAM_TOKEN Token for Telegram bot.
TELEGRAM_CHAT_ID ID for Telegram chat to send message to.
TELEGRAM_MSG_START Start string for messages.

Example output

python .\main.py XXXXX-XXXXX-XXXXX XXXXX-XXXXX-XXXXX XXXXX-XXXXX-XXXXX XXXXX-XXXXX-XXXXX
Username: <username>
Password: 
Enter 2FA code: <2FA code>
Key: XXXXX-XXXXX-XXXXX
        Games: ['Valfaris']
        Sent to friend!
Key: XXXXX-XXXXX-XXXXX
        Games: ['Wheels of Aurelia']
        Redeemed!
Key: XXXXX-XXXXX-XXXXX
        Games: ['Wildermyth']
        Redeemed!
Key: XXXXX-XXXXX-XXXXX
        Games: ['XTHRUST']
        Redeemed!

Make

Make commands.
Run with make <Command>.

Command Description
install_pacman Install packages with pacman.
install_requirements Install requirements with pip.