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.
✅ 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
This API simulates the Free Fire login handshake by:
- Requesting a Garena OAuth token using provided credentials.
- Building an encrypted protobuf payload.
- Sending the payload to the official Garena login server.
- Decoding and returning the structured response as JSON.
📦 FreeFire-JWT-API
┣ 📜 app.py
┣ 📜 FreeFire.proto
┣ 📜 requirements.txt
┗ 📜 README.md
git clone https://github.com/TSun-FreeFire/TSun-FF-JWT-API.git
cd TSun-FF-JWT-APIpip install flask httpx pycryptodome protobufpython app.pyExample 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}"
}You can modify the following in app.py:
VALID_API_KEY = "tsun" #Line:33
RELEASEVERSION = "OB51" #Line:32- API key check prevents unauthorized access.
- Use in a secure environment only (localhost or private server).
- Do not expose Garena credentials publicly.
Developed By: ༯𝙎ค૯𝙀𝘿✘🫀
Team: TSun FreeFire
This project is licensed under the MIT License — feel free to modify and share with credit.