Skip to content

A lightweight, asynchronous Flask-based API that emulates Free Fire’s login process to return account ***JWT Token*** in real-time. Built using **Protobuf**, **AES encryption**, and **async HTTPX** for maximum accuracy and performance.

Notifications You must be signed in to change notification settings

TSun-FreeFire/TSun-FF-JWT-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


A lightweight, asynchronous Flask-based API that emulates Free Fire’s login process to return account JWT Token in real-time.
Built using Protobuf, AES encryption, and async HTTPX for maximum accuracy and performance.


🚀 Features

✅ AES-Encrypted Login Request
✅ Protobuf Parsing (LoginRes)
✅ Region, Token, and Ban Info Extraction
✅ Fast Async I/O with httpx
✅ Built-in API Key Security
✅ Clean JSON Response


🧠 How It Works

This API simulates the Free Fire login handshake by:

  1. Requesting a Garena OAuth token using provided credentials.
  2. Building an encrypted protobuf payload.
  3. Sending the payload to the official Garena login server.
  4. Decoding and returning the structured response as JSON.

📂 Folder Structure


📦 FreeFire-JWT-API
┣ 📜 app.py
┣ 📜 FreeFire.proto
┣ 📜 requirements.txt
┗ 📜 README.md


⚙️ Installation

Step 1 — Clone Repository

git clone https://github.com/TSun-FreeFire/TSun-FF-JWT-API.git
cd TSun-FF-JWT-API

Step 2 — Install Dependencies

pip install flask httpx pycryptodome protobuf

Step 3 — Run Server

python app.py

🔑 Endpoint

GET /v1/auth/{apikey}?uid={uid}&password={password}

Example Request:

http://127.0.0.1:5000/v1/auth/tsun?uid=12345678&password=754NCUB3ZYJNAX1OI24B

Example Response:

{
  "accessToken": "f9596a1377d3daf61a",
  "accountId": "1234567897",
  "agoraEnvironment": "live",
  "ipRegion": "PK",
  "lockRegion": "PK",
  "notiRegion": "SG",
  "serverUrl": "https://clientbp.ggwhitehawk.com",
  "token": "eyJhbGciOiJIUzI1NiIsInN2ciI6IjEiLCJ0eXAiOiJ"
}

Error Responses:

{
  "error": "Error parsing message with type 'LoginRes'"
}
{
  "error": "Invalid format. Use uid={uid}&password={password}"
}

🧩 Environment Variables (Optional)

You can modify the following in app.py:

VALID_API_KEY = "tsun"  #Line:33
RELEASEVERSION = "OB51" #Line:32

🛡️ Security Notes

  • API key check prevents unauthorized access.
  • Use in a secure environment only (localhost or private server).
  • Do not expose Garena credentials publicly.

🌍 Author

Developed By: ༯𝙎ค૯𝙀𝘿✘🫀

Team: TSun FreeFire


📜 License

This project is licensed under the MIT License — feel free to modify and share with credit.



About

A lightweight, asynchronous Flask-based API that emulates Free Fire’s login process to return account ***JWT Token*** in real-time. Built using **Protobuf**, **AES encryption**, and **async HTTPX** for maximum accuracy and performance.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published