Skip to main content

🎮 Free Fire Account Generator

License: MIT Python Version Version

A powerful and reliable Python library for generating and managing Free Fire guest accounts programmatically. Perfect for bot development, account automation, and game testing.

Author: @m2_byte
Status: Production Ready
License: MIT


✨ Features

  • 🤖 Automated Account Generation - Create Free Fire guest accounts instantly
  • 🌍 Multi-Region Support - Generate accounts for 13+ different regions
  • 🔐 Secure Credentials - Returns valid login credentials (UID & Password)
  • ⚡ Auto-Retry Logic - Automatic retry on transient failures
  • 🎯 Comprehensive Error Handling - Detailed error messages and handling
  • 🚀 High Performance - Optimized for batch operations
  • 📝 Well Documented - Complete API documentation with examples

📋 Table of Contents


📦 Installation

Prerequisites

  • Python 3.8 or higher
  • pip package manager

Install from PyPI

pip install freefiregen

🚀 Quick Start

Basic Usage

from freefiregen import create_bot_account

# Create a bot account in Middle East region
result = create_bot_account("MyBot", "ME")

if result['success']:
    print(f"✅ Account Created Successfully!")
    print(f"UID: {result['uid']}")
    print(f"Password: {result['password']}")
    print(f"Account ID: {result['account_id']}")
    print(f"Region: {result['region']}")
else:
    print(f"❌ Error: {result['error']}")

Login with Generated Credentials

# Use the generated credentials to login
uid = result['uid']
password = result['password']

# These credentials can be used with Free Fire login API
# or any Free Fire client that supports guest login

📖 API Reference

create_bot_account(name, region)

Creates a new Free Fire guest account with automatic credential generation.

Parameters:

Parameter Type Description Example
name str Bot name (max 12 characters, auto-truncated) "MyBot"
region str Region code for account creation "ME", "BR", "IND"

Returns:

Dictionary containing account information:

{
    "success": True,                    # Account creation status
    "uid": "123456789",                 # Guest UID (login credential)
    "password": "m2byte...BOT2",        # Guest password (login credential)
    "account_id": "987654321",          # Free Fire account ID
    "name": "MyBot",                    # Confirmed bot name
    "region": "ME",                     # Region code
    "status_code": 200,                 # HTTP response code
    "error": None                       # Error message (if any)
}

Example:

result = create_bot_account("BotName", "ME")

# Check success status
if result['success']:
    # Access the credentials
    print(f"Account ID: {result['account_id']}")
    print(f"Login Credentials: {result['uid']}:{result['password']}")
else:
    # Handle error appropriately
    print(f"Failed to create account: {result['error']}")

🌍 Supported Regions

Code Region Language Description
ME Middle East Arabic Middle East servers
IND India Hindi India/South Asia servers
ID Indonesia Indonesian Indonesia servers
VN Vietnam Vietnamese Vietnam servers
TH Thailand Thai Thailand servers
BD Bangladesh Bengali Bangladesh servers
PK Pakistan Urdu Pakistan servers
TW Taiwan Chinese Taiwan servers
EU Europe English European servers
CIS CIS Region Russian CIS/Russian servers
NA North America English North America servers
SAC South America Spanish South American servers
BR Brazil Portuguese Brazil servers

⚠️ Error Handling

Error Types

The library provides detailed error messages for various scenarios:

Error Type Description Solution
RATE_LIMIT Too many requests to API Wait 30-60 seconds before retrying
DUPLICATE_NAME Name already exists in region Choose a different bot name
INVALID_REGION Invalid region code provided Check supported regions list
NETWORK_ERROR Connection timeout or network issue Check internet connection and retry
API_ERROR API server returned an error Retry after a few seconds
UNKNOWN_ERROR Unexpected error occurred Contact support with error details

Error Handling Example

from freefiregen import create_bot_account

result = create_bot_account("BotName", "ME")

if result['success']:
    # ✅ Success - Account created
    uid = result['uid']
    password = result['password']
    account_id = result['account_id']
    
    print(f"✅ Account created successfully!")
    print(f"Login credentials: {uid}:{password}")
    print(f"Account ID: {account_id}")
    
else:
    # ❌ Error handling
    error = result['error']
    
    if "RATE_LIMIT" in error:
        print("⏳ Rate limited! Please wait before trying again.")
    
    elif "DUPLICATE_NAME" in error:
        print("⚠️ Name already taken! Choose a different name.")
    
    elif "INVALID_REGION" in error:
        print("❌ Invalid region code! Check supported regions.")
    
    elif "NETWORK_ERROR" in error:
        print("🌐 Network error! Check your internet connection.")
    
    else:
        print(f"❌ Error: {error}")

🔧 Advanced Features

1. Automatic Retry Logic

The library automatically retries failed requests up to 3 times for transient network errors. This ensures better reliability when dealing with unstable connections.

# No need to implement retry logic manually
# The library handles it automatically
result = create_bot_account("BotName", "ME")  # Auto-retries on network errors

📚 Examples

Example 1: Single Account Creation

from freefiregen import create_bot_account

# Create a single account
result = create_bot_account("TestBot", "ME")

if result['success']:
    print(f"✅ Account Created")
    print(f"UID: {result['uid']}")
    print(f"Password: {result['password']}")

Example 2: Batch Account Creation

from freefiregen import create_bot_account
import time

bot_names = ["Bot1", "Bot2", "Bot3", "Bot4", "Bot5"]
accounts = []

for name in bot_names:
    result = create_bot_account(name, "ME")
    
    if result['success']:
        accounts.append({
            'name': name,
            'uid': result['uid'],
            'password': result['password'],
            'account_id': result['account_id']
        })
        print(f"✅ Created: {name}")
    else:
        print(f"❌ Failed: {name} - {result['error']}")
    
    # Respectful rate limiting
    time.sleep(1)

print(f"\n📊 Total created: {len(accounts)}")

Example 3: Multi-Region Account Creation

from freefiregen import create_bot_account

regions = ["ME", "IND", "BR", "EU"]

for region in regions:
    result = create_bot_account("GlobalBot", region)
    
    if result['success']:
        print(f"🌍 {region}: {result['account_id']}")
    else:
        print(f"❌ {region}: {result['error']}")

Example 4: Save Accounts to Database

from freefiregen import create_bot_account
import json

def save_account(account_data):
    """Save account data to JSON file"""
    with open('accounts.json', 'a') as f:
        json.dump(account_data, f)
        f.write('\n')

result = create_bot_account("BotName", "ME")

if result['success']:
    save_account({
        'uid': result['uid'],
        'password': result['password'],
        'account_id': result['account_id'],
        'region': result['region']
    })

⚙️ Configuration

Environment Variables (Optional)

You can configure the library behavior using environment variables:

# Set request timeout (seconds)
export FFGEN_TIMEOUT=30

# Set number of retries
export FFGEN_MAX_RETRIES=3

# Enable debug mode
export FFGEN_DEBUG=true

Python Configuration

import os
from freefiregen import create_bot_account

# Override timeout (in seconds)
os.environ['FFGEN_TIMEOUT'] = '30'

# Override max retries
os.environ['FFGEN_MAX_RETRIES'] = '5'

result = create_bot_account("BotName", "ME")

❓ FAQ

Q: Is this library legal to use?
A: This library is for educational and automation testing purposes. Ensure you comply with Free Fire's Terms of Service.

Q: Can I use this in production?
A: Yes, the library is production-ready with automatic error handling and retry logic.

Q: How many accounts can I create?
A: The limit depends on Free Fire's rate limiting. Typically, 1-2 accounts per second is safe.

Q: What should I do about rate limiting?
A: If you get a RATE_LIMIT error, wait 30-60 seconds before retrying.

Q: Can I use accounts for multiple regions?
A: Yes, accounts can be created for any supported region independently.

Q: What's the difference between UID and Account ID?
A: UID is the guest login credential, while Account ID is your Free Fire game account identifier.

Q: How long are the generated accounts valid?
A: Guest accounts are typically valid as long as Free Fire's servers support them.

Q: Can I change the account name after creation?
A: Use Free Fire's in-game features to change your account name (if available in your region).

Q: Is my data secure?
A: Credentials are sent only to Free Fire's official servers.


🔐 Security Notes

  • No Data Storage: The library does not store any account credentials
  • Official Servers Only: All requests are sent to Free Fire's official API endpoints
  • SSL Support: Secure HTTPS connections are used for all communications

Best Practices

  • Store credentials securely (use password managers or encrypted databases)
  • Never commit credentials to version control
  • Use environment variables for sensitive data
  • Implement rate limiting in your applications
  • Respect Free Fire's Terms of Service

📝 Changelog

Version 3.0.0 (Current)

  • ✅ Initial stable release
  • ✅ Support for 13+ regions
  • ✅ Automatic retry logic
  • ✅ Comprehensive error handling

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

MIT License Summary

  • ✅ Commercial use
  • ✅ Modification
  • ✅ Distribution
  • ✅ Private use
  • ❌ No Liability
  • ❌ No Warranty

📧 Support & Contact


🎯 Roadmap

Upcoming Projects

We're building a comprehensive TVN THDV Bot Control Library with:

  • 🤖 Multi-region bot management and automation
  • 📊 Real-time bot monitoring and statistics
  • ⚙️ Advanced configuration management tools
  • 🔄 Batch account operations and optimization
  • 🛡️ Secure bot credential management
  • 📈 Bot performance analytics and reporting
  • 🎮 Game farming and automation features
  • 🔌 Easy integration with existing systems

👨‍💻 Author

@m2_byte


⭐ Acknowledgments

  • Free Fire community
  • Contributors and testers

🙋 Get Help

Common Issues & Solutions

Issue: RATE_LIMIT error

# Solution: Add delay between requests
import time
result = create_bot_account("Bot1", "ME")
time.sleep(2)  # Wait 2 seconds
result = create_bot_account("Bot2", "ME")

Issue: NETWORK_ERROR

# Solution: Check internet connection and retry
try:
    result = create_bot_account("Bot", "ME")
except Exception as e:
    print(f"Network error: {e}")
    # Implement retry logic

Made with ❤️ for Free Fire Community

If this library helped you, please consider giving it a ⭐ star!

⬆ Back to top

Metadata

Release files for freefiregen 3.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for freefiregen 3.0.0
File
freefiregen-3.0.0-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
freefiregen-3.0.0-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
freefiregen-3.0.0-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
freefiregen-3.0.0-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
freefiregen-3.0.0-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details
freefiregen-3.0.0-cp38-cp38-win_amd64.whl CPython 3.8 CPython 3.8 Windows x86-64 Details

Total release size: 2.1 MB

Release files / freefiregen-3.0.0-cp313-cp313-win_amd64.whl

Download URL freefiregen-3.0.0-cp313-cp313-win_amd64.whl
Size 352.8 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
171e1b3003f69aedbd367c1c03b9875dc677f1f4d7b8db0d6e77995775ae3f74
BLAKE2b-256 checksum
How to use checksums
f5c598b56765b86eca7b3a73e50132cb648b75df557907347e43e487626f6023
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release files / freefiregen-3.0.0-cp312-cp312-win_amd64.whl

Download URL freefiregen-3.0.0-cp312-cp312-win_amd64.whl
Size 352.1 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
1386f2f65d89c80ce82cba5a1d4af20ba6affe16cea508c13ceffc55097d144b
BLAKE2b-256 checksum
How to use checksums
3ef26e9d3f347cc809f12c0a00ac932b3eba43a028d3561f87d23c63623cd2b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release files / freefiregen-3.0.0-cp311-cp311-win_amd64.whl

Download URL freefiregen-3.0.0-cp311-cp311-win_amd64.whl
Size 354.7 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
a3bcf6a951bcd830da122309d375db7ec6e0867f8968b5b77a5bb1fcec29808e
BLAKE2b-256 checksum
How to use checksums
abea0300d31d8e423a9420e12ab9e4e068eb5b33e5130227ead84a62c1386290
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release files / freefiregen-3.0.0-cp310-cp310-win_amd64.whl

Download URL freefiregen-3.0.0-cp310-cp310-win_amd64.whl
Size 354.3 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
5d35c8f37a37d808781a905d02e5fa7e6d84f06fbfd4f663d930439b466bf9d8
BLAKE2b-256 checksum
How to use checksums
144f5e21c1901c2d9c8d546e72d00df31e66d0f83ffae2003e136e051f7d5fbc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release files / freefiregen-3.0.0-cp39-cp39-win_amd64.whl

Download URL freefiregen-3.0.0-cp39-cp39-win_amd64.whl
Size 354.7 kB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
2f8abd370d218ce0e6816c31a854bce33a3e65ea1e7281488eb0773a894a0616
BLAKE2b-256 checksum
How to use checksums
22791412bbb4fee53a54df81dcd786f6aa7d91587616283caa9f62bfd163468f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release files / freefiregen-3.0.0-cp38-cp38-win_amd64.whl

Download URL freefiregen-3.0.0-cp38-cp38-win_amd64.whl
Size 355.5 kB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
d72973487a18615d89857c934c2c5e9c4f9435c733e2fac2c9fb982c6868f529
BLAKE2b-256 checksum
How to use checksums
c243c4f5dbecc2409c3b8a876fa5fca1d1a068ca2f52497c9993992d06c3e115
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release history Release notifications | RSS feed

This release

3.0.0 This release

6 release files

2.0.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page