KeyVerify is a lightweight and secure Discord bot for automating license verification of Payhip digital products. It helps creators manage customer access to Discord roles in a streamlined and encrypted way.
- License Verification – Secure and user-friendly verification via in-server modal.
- Auto Role Reassignment – Automatically reapply roles if a verified user rejoins.
- Product Management – Add, list, or remove products with optional auto-generated roles.
- License Reset – Reset usage count of a license for reactivations.
- Audit Logging – Track all verification attempts and role assignments.
- Spam Protection – Rate-limiting built-in to avoid abuse.
- Encrypted Storage – License keys and product secrets are safely encrypted.
| Command | Description |
|---|---|
/start_verification |
Deploys the verification interface to a channel. |
/add_product |
Add a new product with a secret and optional role. |
/remove_product |
Remove a product from the server list. |
/list_products |
View all products and their associated roles. |
/reset_key |
Reset usage for a license key on Payhip. |
/set_lchannel |
Define the channel for verification logs. |
/remove_user |
(Coming soon) Revoke a user's access and licenses. |
- License keys and secrets are AES-encrypted before storage.
- All commands are permission-locked to server owners or admins.
- Cooldown logic prevents excessive or abusive interactions.
- Optional logging ensures traceability in any server.
- Clone the repo:
git clone https://github.com/Fayelicious/KeyVerify_Discord_Bot.git
Install dependencies:
pip install -r requirements.txt
KeyVerify uses AES encryption to securely store license keys and product secrets. To enable this, you need to generate a secure secret key and add it to your environment variables.
Generate a 32-byte (256-bit) encryption key Run this Python snippet in your terminal or Python shell:
import base64, os
print(base64.urlsafe_b64encode(os.urandom(32)).decode())
This will output a secure key like:
WdIf6ZfNNuHrXkVvZBMyPZr7nqSItmGqM9dWBtZsKfs=
Set it in your .env file
ENCRYPTION_KEY=WdIf6ZfNNuHrXkVvZBMyPZr7nqSItmGqM9dWBtZsKfs=
That’s it! The bot will automatically load and use this key to encrypt/decrypt sensitive data.
Important: Keep your encryption key secret. Never commit .env or the key to GitHub.
Create a .env file in the bot root:
DATABASE_URL=your_postgres_connection_url
PAYHIP_API_KEY=your_payhip_api_key
Run the bot:
python bot.py
Make sure your bot has required permissions: Manage Roles, Send Messages, and Read Message History.
Project Status KeyVerify is actively in development and used in live communities like Poodle's Discord. Feedback, contributions, and issue reports are always welcome!
Support & Contact For help or to suggest a feature:
Discord: Fayelicious_
Built With disnake
Payhip API
PostgreSQL + asyncpg
Python 3.11+
Legal for Hosted Bot
Privacy Policy Terms of Service
Link to hosted Bot KeyVerify