I created this for someone, this is usable for pretty much anyone in need of an api-based licensing system. API will return a json response either authorized or unauthorized at the url example.com/api/check_license/LICENSEHERE.
Any questions shoot me a dm, user is pandadevv
What the things do also in readme.txt:
there are 3 files 2 need to be run 24/7
In the admin.py it will set up all the needed tables in the database and you will be able to control when the license key exires, create a new license key, wipe the database, and delete the license key and view all the current ones!
In the API, it will start a Flask server on port 81 via 0.0.0.0 this will be your endpoint so: http://localhost:81/check_license/LICENSEHERE
The Flask server will access the database you put in and read every license, if you replaced LICENSEHERE with a valid license you may get a response like: {"status":"authorized"}
If you put in a key with a key that expires you may get a json response with: {"expiration":"2023-10-08 19:18:37","status":"authorized"}
(you can also set a discord webhook reccomended) - I commented out the Authorized account notifs because its not very useful and will just spam the webhook.
In Checker.py it would be used to monitor and manage license keys stored in a MySQL database. When a license key expires, it is removed from the database automatically, and a notification is sent to a Discord channel(if webhook is set). The script runs continuously to perform these checks and notifications every 30 seconds.
Any questions shoot me a dm, user is pandadevv
What the things do also in readme.txt:
there are 3 files 2 need to be run 24/7
In the admin.py it will set up all the needed tables in the database and you will be able to control when the license key exires, create a new license key, wipe the database, and delete the license key and view all the current ones!
In the API, it will start a Flask server on port 81 via 0.0.0.0 this will be your endpoint so: http://localhost:81/check_license/LICENSEHERE
The Flask server will access the database you put in and read every license, if you replaced LICENSEHERE with a valid license you may get a response like: {"status":"authorized"}
If you put in a key with a key that expires you may get a json response with: {"expiration":"2023-10-08 19:18:37","status":"authorized"}
(you can also set a discord webhook reccomended) - I commented out the Authorized account notifs because its not very useful and will just spam the webhook.
In Checker.py it would be used to monitor and manage license keys stored in a MySQL database. When a license key expires, it is removed from the database automatically, and a notification is sent to a Discord channel(if webhook is set). The script runs continuously to perform these checks and notifications every 30 seconds.