Automated Discord token extraction using browser automation - built for developers who need programmatic access
This Python library securely extracts Discord user tokens through automated browser interactions using Playwright. Perfect for automation scripts, testing environments, or applications requiring Discord API access.
- 🛡️ Robust Error Handling - Comprehensive exception catching for reliable operation
- 🔐 2FA Support - Full TOTP (Time-based One-Time Password) authentication
- ⚡ Dual API - Both synchronous and asynchronous methods available
- 🎭 Browser Automation - Powered by Playwright for reliable, real-browser interactions
- 🔒 Secure Process - No credential storage, direct token extraction
pip install git+https://github.com/BlueSchnabeltier/discord-token-extractor.git
from discord_token_extractor import Extractor
# Initialize extractor
extractor = Extractor(
email="your-email@example.com",
password="your-secure-password",
totp_secret="your-2fa-secret" # Optional - only if 2FA is enabled
)
# Extract token (synchronous)
token = extractor.sync_extract_token()
print(f"Your Discord token: {token}")
import asyncio
from discord_token_extractor import Extractor
async def get_discord_token():
extractor = Extractor(
email="your-email@example.com",
password="your-secure-password"
)
token = await extractor.async_extract_token()
return token
# Run async extraction
token = asyncio.run(get_discord_token())
from discord_token_extractor import Extractor
# For accounts with 2FA enabled
extractor = Extractor(
email="your-email@example.com",
password="your-secure-password",
totp_secret="JBSWY3DPEHPK3PXP" # Your TOTP secret from authenticator setup
)
token = extractor.sync_extract_token()
- Security: Never hardcode credentials in production code
- Rate Limits: Discord may impose rate limits on login attempts
- Terms of Service: Ensure compliance with Discord's Terms of Service
- 2FA: TOTP secret is only required if two-factor authentication is enabled
- Python 3.7+
- Playwright (automatically installed)
- Active Discord account