A Python automation tool that checks your X (Twitter) followers and automatically follows back users who follow you.
⚠️ Use responsibly. Automation on social platforms may violate platform rules or trigger rate limits. Keep your account safe and never share your cookies or tokens.
- Automatically detects new followers
- Follows back users who are not already followed
- Uses randomized delays to avoid robotic behavior
- Refreshes
ct0automatically fromauth_token - Handles rate limits with cooldown
- Simple
config.jsonsetup - Clean terminal logs with status messages
- Python
tls_clientcolorama- X/Twitter internal API endpoints
X-AutoFollowBack/
├── main.py
└── config.jsonClone the repository:
git clone https://github.com/Deepthanush1337/X-AutoFollowBack.git
cd X-AutoFollowBackInstall dependencies:
pip install tls_client coloramaOpen config.json and add your X auth_token:
{
"auth_token": "YOUR_AUTH_TOKEN_HERE",
"ct0": ""
}The tool will automatically derive and update the ct0 value when it runs.
- Open x.com in Chrome.
- Press
F12to open Developer Tools. - Go to Application.
- Open Cookies →
https://x.com. - Copy the value of
auth_token. - Paste it into
config.json.
Run the script:
python main.pyThe bot will:
- Authenticate using your
auth_token. - Derive a fresh
ct0. - Fetch your followers.
- Fetch your following list.
- Follow back users who follow you but are not followed back yet.
- Repeat checks after randomized intervals.
- Do not upload your real
auth_tokento GitHub. - Keep
config.jsonprivate if it contains tokens. - Too many follow actions can trigger rate limits.
- This project is intended for learning and personal automation experiments.
Your auth_token gives access to your X account session. Treat it like a password.
Recommended:
echo config.json >> .gitignoreThen create a safe example config:
{
"auth_token": "",
"ct0": ""
}Save it as:
config.example.jsonThis project is for educational purposes only. Use it at your own risk. The developer is not responsible for account restrictions, rate limits, or misuse.