-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started
SaeedX edited this page Jun 25, 2026
·
1 revision
This page walks you through running the API locally for development.
- Python 3.10+ (3.11 recommended)
- A Neon PostgreSQL database (or any PostgreSQL connection string)
-
pip/venv
git clone https://github.com/TSun-FreeFire/TSun-FF-JWT-API.git
cd TSun-FF-JWT-APIpython -m venv .venv
# Linux / macOS
source .venv/bin/activate
# Windows (PowerShell)
.venv\Scripts\Activate.ps1pip install -r requirements.txtThe pinned dependencies are:
| Package | Purpose |
|---|---|
flask |
Web framework |
httpx |
Async HTTP client |
protobuf==6.33.5 |
Protocol Buffers runtime |
pycryptodome |
AES encryption |
gunicorn + gevent
|
Production WSGI server |
python-dotenv |
Loads .env
|
psycopg2-binary |
PostgreSQL driver |
Copy the example file and fill in your own values:
cp .env.example .env# Master API Key (never expires, used by the frontend by default)
VALID_API_KEY=Your_Api_Key
# Admin Key (used to generate / revoke temporary API keys)
ADMIN_KEY=Your_admin_Key
# Neon PostgreSQL connection string
DATABASE_URL=your_neon_database_connection_stringSee Configuration for the full list, including the optional remote config.json.
python app.pyThe app starts on http://127.0.0.1:5000 with Flask's debug server. On startup it will:
- Download the runtime
config.json(release version + login URL). - Validate that
VALID_API_KEY,ADMIN_KEYandDATABASE_URLare set. - Connect to PostgreSQL and create the
api_keystable if it doesn't exist.
If any required variable or the database connection is missing, the process exits immediately with a CRITICAL ERROR message.
curl "http://127.0.0.1:5000/v1/auth/Your_Api_Key?uid=12345678&password=YOURGUESTPASSWORD"Open http://127.0.0.1:5000/ in a browser to use the built‑in dashboard ("TSun Jwt Maker").
For production, do not use
python app.py(debug server). Use Gunicorn / Docker instead — see Deployment.
TSun FF JWT API · MIT License · Built by 𝙎ค૯𝙀𝘿✘🫀 for TSun FreeFire × Script Kittens