File size: 1,286 Bytes
06fcc09 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | # Instagram Bot Setup Guide
The Instagram automation agent has been generated. Follow these steps to get it running.
## 1. Setup Environment
1. Open the file `.env.example` and rename it to `.env` (or create a new `.env` file).
2. Fill in your Instagram credentials:
```bash
IG_USERNAME=your_actual_username
IG_PASSWORD=your_actual_password
IG_MESSAGE_TEXT=Hi! Thanks for following. Check out my link...
```
## 2. Install Dependencies
Open a terminal in the project directory and run:
```bash
pip install -r requirements.txt
```
## 3. Run the Bot
```bash
python main.py
```
## How it works
1. **First Run**: It will just fetch your current followers and save them to `followers.json`. It **will not** sends DMs to existing followers.
2. **Subsequent Runs**: It checks every 10 minutes. If it finds a *new* follower (someone not in the JSON file), it sends them the DM and adds them to the list.
> [!WARNING]
> - **Two-Factor Authentication (2FA)**: If you have 2FA enabled, `instagrapi` might ask for the code in the terminal or fail. It is recommended to use a dedicated account or disable 2FA for the bot if possible (though less secure).
> - **Safety**: Do not decrease the polling interval (600s). Fast actions can lead to temporary or permanent bans.
|