Automated Borderlands SHiFT code scraper and redeemer. This tool automatically scrapes SHiFT codes from websites and redeems them to your account across multiple Borderlands games and platforms.
Docker Hub: https://hub.docker.com/r/slipping/bl4-autoshift
Multi-Game Support: Works with all Borderlands games (BL1, BL2, BL:TPS, BL3, TTW, BL4)
The application scrapes SHiFT codes from these gaming websites:
- https://mentalmars.com/game-news/borderlands-4-shift-codes/
- https://mentalmars.com/game-news/borderlands-golden-keys/
- https://gaming.news/codex/borderlands-4-shift-codes-list-guide-and-troubleshooting/
- https://thegamepost.com/borderlands-4-all-shift-codes/
- https://www.polygon.com/borderlands-4-active-shift-codes-redeem/
- https://www.ign.com/wikis/borderlands-4/Borderlands_4_SHiFT_Codes
- https://www.gamespot.com/articles/borderlands-4-shift-codes-all-active-keys-and-how-to-redeem-them/1100-6533833/
All codes are redeemed via the official SHiFT website: https://shift.gearboxsoftware.com
Configure a Discord webhook to receive rich notifications about code redemptions and issues.
- Open Discord and navigate to your server
- Go to Server Settings > Integrations > Webhooks
- Click "New Webhook" or "Create Webhook"
- Give it a name (e.g., "BL4 AutoSHiFT")
- Select the channel for notifications
- Copy the Webhook URL
- Add to your
.envfile:DISCORD_WEBHOOK_URL=<your_webhook_url>
Successful Redemptions (Green Embed)
- Displays each redeemed code with details
- Shows game titles, platforms (Steam/Epic/etc), and rewards
- Example: "1 Golden Key", "5 Golden Keys", "Cosmetic Pack: Vault Hunter Bundle"
Authentication Failures (Red Embed)
- Alerts when login to SHiFT fails
- Includes error details and required actions
- Check your SHIFT_EMAIL and SHIFT_PASSWORD settings
Game Launch Required (Orange Embed)
- Notifies when SHiFT requires launching a game
- Lists up to 5 affected codes
- Automatically retries on next run after you launch a game
- Create docker-compose.yml:
services:
autoshift:
image: slipping/bl4-autoshift:latest
container_name: bl4-autoshift
restart: unless-stopped
env_file: .env
volumes:
- bl4-autoshift-data:/app/data
user: "1000:1000"
volumes:
bl4-autoshift-data:- Create .env file:
# BL4 AutoSHiFT - Configuration
# Copy this file to .env and edit with your details
# REQUIRED: Your SHiFT account
SHIFT_EMAIL=[email protected]
SHIFT_PASSWORD=your_password
# REQUIRED: Which services/platforms to redeem codes for (they must be linked on your shift account)
#steam - Steam (PC)
#epic - Epic Games Store (PC)
#psn - PlayStation Network (PS4/PS5)
#xboxlive - Xbox Live (Xbox One/Series)
#nintendo - Nintendo Switch (not tested)
ALLOWED_SERVICES=steam
# REQUIRED: Which game titles to redeem codes for
# bl1 = Borderlands: Game of the Year Edition
# bl2 = Borderlands 2
# blps = Borderlands: The Pre-Sequel
# bl3 = Borderlands 3
# ttw = Tiny Tina's Wonderlands
# bl4 = Borderlands 4
ALLOWED_TITLES=bl4
# OPTIONAL: How often to run (in seconds)
SCHEDULE_INTERVAL=3600 # 3600 = 1 hour
# OPTIONAL: Discord webhook URL for notifications
# Notifications include:
# - Successful code redemptions with rewards/titles/services
# - Authentication failures requiring action
# - Game launch requirements (SHiFT lockout)
# Create a webhook in Discord: Server Settings > Integrations > Webhooks > New Webhook
DISCORD_WEBHOOK_URL=
# OPTIONAL: Enable detailed logging
VERBOSE=1
# OPTIONAL: Your timezone (use TZ identifier from https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)
TZ=UTC
# OPTIONAL: Delay between code redemption attempts (in seconds)
DELAY_SECONDS=5- Start the container:
docker compose up -d- SHIFT_EMAIL - Your SHiFT account email address
- SHIFT_PASSWORD - Your SHiFT account password
- ALLOWED_SERVICES - Comma-separated list of platforms to redeem codes for
- ALLOWED_TITLES - Comma-separated list of Borderlands games to redeem codes for
steam- Steam (PC)epic- Epic Games Store (PC)psn- PlayStation Network (PS4/PS5)xboxlive- Xbox Live (Xbox One/Series)nintendo- Nintendo Switch (not tested)
Important: These platforms must be linked to your SHiFT account at https://shift.gearboxsoftware.com/associations
bl1- Borderlands: Game of the Year Editionbl2- Borderlands 2blps- Borderlands: The Pre-Sequelbl3- Borderlands 3ttw- Tiny Tina's Wonderlandsbl4- Borderlands 4
To redeem codes for multiple games, in your .env:
ALLOWED_TITLES=bl3,bl4,ttw
ALLOWED_SERVICES=steam,epic- SCHEDULE_INTERVAL - Seconds between runs (default: 3600 = 1 hour)
- VERBOSE - Enable detailed logging: 1 or 0 (default: 1)
- DISCORD_WEBHOOK_URL - Discord webhook for notifications (see Discord Integration section)
- TZ - Container timezone (default: UTC, i.e.: America/New_York)
Before using this script, you must link your gaming platforms to your SHiFT account:
- Visit https://shift.gearboxsoftware.com/associations
- Sign into your SHiFT account
- Link each platform you want to use (Steam, Epic, PSN, XboxLive, Nintendo)
- Configure
ALLOWED_SERVICESto include only your linked platforms
If you see "Platform not available" errors, the platform isn't properly linked to your account.
Gearbox sometimes requires launching a SHiFT-enabled game before allowing code redemption. When this occurs:
- The scraper detects the requirement and pauses redemption
- Discord notification is sent (if configured)
- Launch any Borderlands game and sign into SHiFT in-game
- The scraper automatically resumes on the next run
Uses SQLite to store:
- Discovered SHiFT codes with expiration dates
- Redemption history and results
- Code availability per service/title combination
- Configuration change tracking
The database is stored in the Docker volume and persists between container updates.
"Platform not available" errors
- Ensure the platform is linked at https://shift.gearboxsoftware.com/associations
- Check
ALLOWED_SERVICESmatches your linked platforms
"Code valid for: bl1" messages
- This is normal - codes are filtered by your
ALLOWED_TITLESsetting - Only codes matching your configured games will be redeemed
Rate limiting (429 errors)
- Built-in retry logic handles temporary rate limits
- Consider increasing
SCHEDULE_INTERVALif persistent
Game launch required
- Launch any Borderlands game and sign into SHiFT
- This sometimes will clear up on it's own without you having to open a game, but if you have a lot of codes to redeem, expect to see this a lot as it works through them.
MIT License - see LICENSE file for details.