🤖 Automated SheerID student/teacher verification Telegram bot
Based on @auto_sheerid_bot (GGBond) with improvements.
This is a Python-based Telegram bot that automates SheerID student/teacher verification for multiple platforms.
The bot automatically generates identity information, creates verification documents, and submits them to the SheerID platform, greatly simplifying the process.
⚠️ Important:
- Services such as Gemini One Pro, ChatGPT Teacher K12, Spotify Student, and YouTube Premium Student require updating verification data such as
programIdin each module’s configuration file before use. See the “Must Read Before Use” section below.- This project also includes an implementation approach and API documentation for ChatGPT Military verification. See
military/README.mdfor details.
| Command | Service | Type | Status | Description |
|---|---|---|---|---|
/verify |
Gemini One Pro | Teacher | ✅ Stable | Google AI Studio Education Discount |
/verify2 |
ChatGPT Teacher K12 | Teacher | ✅ Stable | OpenAI ChatGPT Education Discount |
/verify3 |
Spotify Student | Student | ✅ Stable | Spotify Student Subscription Discount |
/verify4 |
Bolt.new Teacher | Teacher | ✅ Stable | Bolt.new Education Discount (auto reward code) |
/verify5 |
YouTube Premium Student | Student | YouTube Premium Student Discount (see notes below) |
⚠️ YouTube Verification NotesYouTube verification is currently in beta. Please read
youtube/HELP.MDcarefully before using.Key differences:
- YouTube’s original link format differs from other services
- You must manually extract
programIdandverificationIdfrom browser network logs- You then manually construct a standard SheerID verification URL
Usage steps:
- Visit the YouTube Premium student verification page
- Open browser DevTools (F12) → Network tab
- Start the verification process and search for
https://services.sheerid.com/rest/v2/verification/- Extract
programIdfrom the request payload andverificationIdfrom the response- Construct a link:
https://services.sheerid.com/verify/{programId}/?verificationId={verificationId}- Submit this URL to the bot via
/verify5
💡 ChatGPT Military Verification
This project documents the approach and APIs for ChatGPT Military SheerID verification.
The flow differs from normal student/teacher verification: you must callcollectMilitaryStatusfirst to set the military status, then submit personal info.
Seemilitary/README.mdfor full details; you can integrate it into the bot based on that document.
- 🚀 Automated flow: One command to generate data, create documents, and submit verification
- 🎨 Smart generation: Auto-generates student/teacher ID PNG images
- 💰 Credit system: Multiple ways to earn (check-ins, invites, redemption codes, manual top-up)
- 🔐 Reliable storage: MySQL database with environment-based configuration
- ⚡ Concurrency control: Manages concurrent verification requests for stability
- 👥 Admin tools: Full user and credit management, broadcast, and card key system
- Language: Python 3.11+
- Bot Framework: python-telegram-bot 20.0+
- Database: MySQL 5.7+
- Browser Automation: Playwright
- HTTP Client: httpx
- Image/PDF: Pillow, reportlab, xhtml2pdf
- Env 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 your values:
# Telegram Bot
BOT_TOKEN=your_bot_token_here
CHANNEL_USERNAME=your_channel
CHANNEL_URL=https://t.me/your_channel
CHANNEL_ID=0
SECONDARY_CHANNEL_URL=
ADMIN_USER_ID=your_admin_id
# MySQL Database
MYSQL_HOST=localhost
MYSQL_PORT=3306
MYSQL_USER=root
MYSQL_PASSWORD=your_password
MYSQL_DATABASE=tgbot_verifypython bot.py# 1. Configure .env
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 # Show current credit balance
/qd # Daily check-in (+1 credit)
/invite # Generate invite link (1 extra credit per 10 successful invites)
/use <code> # Redeem credits with a card key
/verify <url> # Gemini One Pro verification
/verify2 <url> # ChatGPT Teacher K12 verification
/verify3 <url> # Spotify Student verification
/verify4 <url> # Bolt.new Teacher verification
/verify5 <url> # YouTube Premium Student verification
/getV4Code <id> # Get Bolt.new verification code
/help # Show help and inline buttons/addbalance <user_id> <credits> # Add credits to a user
/block <user_id> # Block a user
/white <user_id> # Unblock a user
/blacklist # View blacklist
/genkey <code> <credits> [uses] [days] # Create card key (optional multi-use and expiry)
/listkeys # List card keys
/broadcast <text> # Broadcast a message to all users
/admin # Open admin panel (inline help buttons)-
Get a verification link
- Visit the relevant service’s verification page
- Start the verification flow
- Copy the full URL from your browser address bar (must contain
verificationId)
-
Submit to the bot
/verify3 https://services.sheerid.com/verify/xxx/?verificationId=yyy -
Bot processing
- Bot generates identity information
- Creates student/teacher ID image(s)
- Submits everything to SheerID
-
Receive result
- Review usually completes within a few minutes
- On success, you receive a redirect URL (or reward code for some flows)
tgbot-verify/
├── bot.py # Main bot entrypoint
├── config.py # Global configuration
├── database_mysql.py # MySQL storage layer
├── .env # Environment variables (not committed)
├── env.example # Environment variable template
├── requirements.txt # Python dependencies
├── Dockerfile # Docker image definition
├── docker-compose.yml # Docker Compose config
├── handlers/ # Command handlers
│ ├── user_commands.py # User-facing 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 Student verification module
├── Boltnew/ # Bolt.new Teacher verification module
├── military/ # ChatGPT Military verification docs/approach
└── utils/ # Utility helpers
├── messages.py # User-facing message templates
├── concurrency.py # Concurrency control
└── checks.py # Permission & channel checks
| Variable | Required | Description | Default |
|---|---|---|---|
BOT_TOKEN |
✅ | Telegram Bot token | - |
CHANNEL_USERNAME |
❌ | Public channel username (without @) |
pk_oa |
CHANNEL_URL |
❌ | Public channel link | https://t.me/pk_oa |
CHANNEL_ID |
❌ | Numeric channel ID for membership checks (private OK) | treated as disabled |
SECONDARY_CHANNEL_URL |
❌ | Backup channel link | empty |
ADMIN_USER_ID |
✅ | Admin Telegram user ID | - |
MYSQL_HOST |
✅ | MySQL host | localhost |
MYSQL_PORT |
❌ | MySQL port | 3306 |
MYSQL_USER |
✅ | MySQL username | - |
MYSQL_PASSWORD |
✅ | MySQL password | - |
MYSQL_DATABASE |
✅ | Database name | tgbot_verify |
You can customize credit rules in config.py:
VERIFY_COST = 1 # Credits consumed per verification
CHECKIN_REWARD = 1 # Credits granted per daily check-in
# INVITE_REWARD is used as an internal coefficient.
# Current effective rule: every 10 successful invites = +1 credit.
INVITE_REWARD = 2
REGISTER_REWARD = 1 # Credits granted on first registrationBefore running the bot in production, you must review and update each module’s verification configuration.
Because SheerID’s programId values may change over time, the following modules must be checked and updated:
one/config.py– Gemini One Pro (updatePROGRAM_IDas needed)k12/config.py– ChatGPT Teacher K12spotify/config.py– Spotify Studentyoutube/config.py– YouTube Premium StudentBoltnew/config.py– Bolt.new Teacher (recommended to verifyPROGRAM_ID)
How to get the latest programId:
- Visit the relevant service’s verification page.
- Open DevTools → Network tab.
- Start the verification flow.
- Look for requests to
https://services.sheerid.com/rest/v2/verification/. - Extract
programIdfrom the URL or request payload. - Update the corresponding
PROGRAM_IDin that module’sconfig.py.
If verification suddenly starts failing across all users for one service, it is very likely the
programIdhas changed.
- 📺 Telegram Channel: https://t.me/pk_oa
- 🐛 Issue Tracker: https://github.com/PastKing/tgbot-verify/issues
- 📖 Deployment Guide: DEPLOY.md
Contributions and forks are welcome. Please follow these rules:
-
Preserve original author info
- Keep the original repository URL in code and documentation.
- Explicitly mention that your project is based on this one.
-
Open-source license
- This project uses the MIT License.
- Derivative projects must remain open source as well.
-
Commercial use
- Free for personal use.
- For commercial use, you are responsible for your own modifications and maintenance.
- No warranty or official support is 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 original codebase.
- Thanks to all contributors who helped improve this project.
- Thanks to the SheerID platform for providing the verification infrastructure.
- ✨ Added Spotify Student and YouTube Premium Student flows (YouTube is beta, see
youtube/HELP.MD) - 🚀 Improved concurrency and performance
- 📝 Expanded documentation and deployment guide
- 🐛 Fixed known bugs
- 🎉 Initial release
- ✅ Support for Gemini, ChatGPT, Bolt.new flows
⭐ If this project helps you, please consider giving it a Star.
Made with ❤️ by PastKing