🤖 Automated SheerID Student/Teacher Verification Telegram Bot
Based on @auto_sheerid_bot GGBond's legacy code with improvements
[English Documentation]
A Python-based Telegram bot that automates SheerID student/teacher identity verification for multiple platforms. The bot automatically generates identity information, creates verification documents, and submits them to the SheerID platform, significantly simplifying the verification process.
⚠️ Important Notice:
- Services such as Gemini One Pro, ChatGPT Teacher K12, Spotify Student, and YouTube Premium Student require updating verification data (e.g.,
programId) in each module's configuration file before use. Please refer to the "Must Read Before Use" section below for details.- This project also provides implementation approach and API documentation for ChatGPT Military verification. For detailed information, please refer to
military/README.md. Users can integrate this based on the documentation.
| Command | Service | Type | Status | Description |
|---|---|---|---|---|
/verify |
Gemini One Pro | Teacher | ✅ Complete | Google AI Studio Education Discount |
/verify2 |
ChatGPT Teacher K12 | Teacher | ✅ Complete | OpenAI ChatGPT Education Discount |
/verify3 |
Spotify Student | Student | ✅ Complete | Spotify Student Subscription Discount |
/verify4 |
Bolt.new Teacher | Teacher | ✅ Complete | Bolt.new Education Discount (Auto code retrieval) |
/verify5 |
YouTube Premium Student | Student | YouTube Premium Student Discount (See notes below) | |
/verify6 |
Perplexity Pro | Student | ✅ Complete | Perplexity Pro Student Discount (NL IP recommended) |
⚠️ YouTube Verification Special Notes:YouTube verification is currently in beta status. Please carefully read
youtube/HELP.MDbefore use.Key Differences:
- YouTube's original link format differs from other services
- Requires manual extraction of
programIdandverificationIdfrom browser network logs- Must manually construct standard SheerID link format
Usage Steps:
- Visit YouTube Premium student verification page
- Open browser DevTools (F12) → Network tab
- Start verification process, search for
https://services.sheerid.com/rest/v2/verification/- Extract
programIdfrom request payload andverificationIdfrom response- Manually construct link:
https://services.sheerid.com/verify/{programId}/?verificationId={verificationId}- Submit the link using
/verify5command
💡 ChatGPT Military Verification Approach:
This project provides implementation approach and API documentation for ChatGPT Military SheerID verification. The military verification process differs from regular student/teacher verification, requiring an initial
collectMilitaryStatusAPI call to set military status before submitting personal information. For detailed implementation approach and API documentation, please refer tomilitary/README.md. Users can integrate this into the bot based on the documentation.
- 🚀 Automated Process: One-click completion of info generation, document creation, and submission
- 🎨 Smart Generation: Auto-generates student/teacher ID PNG images
- 💰 Points System: Multiple earning methods including check-ins, invitations, and redemption codes
- 🔐 Secure & Reliable: MySQL database with environment variable configuration
- ⚡ Concurrency Control: Intelligent management of concurrent requests for stability
- 👥 Admin Features: Complete user and points management system
- Language: Python 3.11+
- Bot Framework: python-telegram-bot 20.0+
- Database: MySQL 5.7+
- Browser Automation: Playwright
- HTTP Client: httpx
- Image Processing: Pillow, reportlab, xhtml2pdf
- Environment Management: python-dotenv
git clone https://github.com/PastKing/tgbot-verify.git
cd tgbot-verifypip install -r requirements.txt
playwright install chromiumCopy env.example to .env and fill in the configuration:
# Telegram Bot Configuration
BOT_TOKEN=your_bot_token_here
CHANNEL_USERNAME=your_channel
CHANNEL_URL=https://t.me/your_channel
ADMIN_USER_ID=your_admin_id
# MySQL Database Configuration
MYSQL_HOST=localhost
MYSQL_PORT=3306
MYSQL_USER=root
MYSQL_PASSWORD=your_password
MYSQL_DATABASE=tgbot_verifypython bot.py# 1. Configure .env file
cp env.example .env
nano .env
# 2. Start services
docker-compose up -d
# 3. View logs
docker-compose logs -f# Build image
docker build -t tgbot-verify .
# Run container
docker run -d \
--name tgbot-verify \
--env-file .env \
-v $(pwd)/logs:/app/logs \
tgbot-verify/start # Start using (register)
/about # Learn about bot features
/balance # Check points balance
/qd # Daily check-in (+1 point)
/invite # Generate invitation link (+2 points per person)
/use <code> # Redeem points with code
/verify <link> # Gemini One Pro verification
/verify2 <link> # ChatGPT Teacher K12 verification
/verify3 <link> # Spotify Student verification
/verify4 <link> # Bolt.new Teacher verification
/verify5 <link> # YouTube Premium Student verification
/verify6 <link> # Perplexity Pro student verification
/getV4Code <id> # Get Bolt.new verification code
/help # View help information/addbalance <user_id> <points> # Add user points
/block <user_id> # Block user
/white <user_id> # Unblock user
/blacklist # View blacklist
/genkey <code> <points> [times] [days] # Generate redemption code
/listkeys # View redemption code list
/broadcast <text> # Broadcast notification-
Get Verification Link
- Visit the corresponding service's verification page
- Start the verification process
- Copy the full URL from browser address bar (including
verificationId)
-
Submit Verification Request
/verify3 https://services.sheerid.com/verify/xxx/?verificationId=yyy -
Wait for Processing
- Bot automatically generates identity information
- Creates student/teacher ID image
- Submits to SheerID platform
-
Get Results
- Review usually completes within minutes
- Success returns redirect link
tgbot-verify/
├── bot.py # Main bot program
├── config.py # Global configuration
├── database_mysql.py # MySQL database management
├── .env # Environment variables (create yourself)
├── env.example # Environment variables template
├── requirements.txt # Python dependencies
├── Dockerfile # Docker image build
├── docker-compose.yml # Docker Compose configuration
├── handlers/ # Command handlers
│ ├── user_commands.py # User commands
│ ├── admin_commands.py # Admin commands
│ └── verify_commands.py # Verification commands
├── one/ # Gemini One Pro verification module
├── k12/ # ChatGPT K12 verification module
├── spotify/ # Spotify Student verification module
├── youtube/ # YouTube Premium verification module
├── Boltnew/ # Bolt.new verification module
├── military/ # ChatGPT Military verification approach documentation
└── utils/ # Utility functions
├── messages.py # Message templates
├── concurrency.py # Concurrency control
└── checks.py # Permission checks
| Variable | Required | Description | Default |
|---|---|---|---|
BOT_TOKEN |
✅ | Telegram Bot Token | - |
CHANNEL_USERNAME |
❌ | Channel username | pk_oa |
CHANNEL_URL |
❌ | Channel link | https://t.me/pk_oa |
ADMIN_USER_ID |
✅ | Admin Telegram ID | - |
MYSQL_HOST |
✅ | MySQL host address | localhost |
MYSQL_PORT |
❌ | MySQL port | 3306 |
MYSQL_USER |
✅ | MySQL username | - |
MYSQL_PASSWORD |
✅ | MySQL password | - |
MYSQL_DATABASE |
✅ | Database name | tgbot_verify |
Customize point rules in config.py:
VERIFY_COST = 1 # Points cost for verification
CHECKIN_REWARD = 1 # Check-in reward points
INVITE_REWARD = 2 # Invitation reward points
REGISTER_REWARD = 1 # Registration reward pointsBefore using the bot, please check and update verification configurations in each module!
Since SheerID platform's programId may be updated periodically, the following services must update verification data in their configuration files before use:
one/config.py- Gemini One Pro verification (updatePROGRAM_ID)k12/config.py- ChatGPT Teacher K12 verification (updatePROGRAM_ID)spotify/config.py- Spotify Student verification (updatePROGRAM_ID)youtube/config.py- YouTube Premium Student verification (updatePROGRAM_ID)Boltnew/config.py- Bolt.new Teacher verification (recommended to checkPROGRAM_ID)
How to get the latest programId:
- Visit the corresponding service's verification page
- Open browser DevTools (F12) → Network tab
- Start the verification process
- Look for
https://services.sheerid.com/rest/v2/verification/requests - Extract
programIdfrom URL or request payload - Update the corresponding module's
config.pyfile
Tip: If verification keeps failing, the
programIdis likely outdated. Please update it following the steps above.
- 📺 Telegram Channel: https://t.me/pk_oa
- 🐛 Issue Tracking: GitHub Issues
- 📖 Deployment Guide: DEPLOY.md
Secondary development is welcome! Please follow these rules:
-
Preserve Original Author Info
- Keep original repository address in code and documentation
- Note that it's based on this project
-
Open Source License
- This project uses MIT License
- Secondary development projects must also be open source
-
Commercial Use
- Free for personal use
- Commercial use requires self-optimization and liability
- No technical support or warranty provided
This project is licensed under the MIT License.
MIT License
Copyright (c) 2025 PastKing
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction...
- Thanks to @auto_sheerid_bot GGBond for the legacy code foundation
- Thanks to all developers who contributed to this project
- Thanks to SheerID platform for providing verification services
- ✨ Added Spotify Student and YouTube Premium Student verification (YouTube is in beta, see youtube/HELP.MD)
- 🚀 Optimized concurrency control and performance
- 📝 Improved documentation and deployment guide
- 🐛 Fixed known bugs
- 🎉 Initial release
- ✅ Support for Gemini, ChatGPT, Bolt.new verification
⭐ If this project helps you, please give it a Star!
Made with ❤️ by PastKing