English‐User‐Guide - jadrian77/SaveRestrictedContentBot GitHub Wiki
Table of Contents
Prerequisites
Obtaining Required Keys
- Step 1: Key Acquisition
-
API_ID & API_HASH
- Log in to Telegram API Platform
- Navigate to API Development Tools to create a new application
- Submit application details
-
Generate BOT_TOKEN
- Create a bot via @BotFather and follow setup instructions
-
Generate SESSION String
- Visit Pyrogram Session Generator
- Select Pyrogram framework and fill in API_ID, API_HASH, and BOT_TOKEN
Each session is unique - generating a new session invalidates previous ones
-
Configure FORCESUB Channel
- Create a Telegram channel, add bot as administrator, users must join to access services
-
Set AUTH Admin ID
- Retrieve your Telegram ID via @myidbot
-
- Step 2: Environment Configuration
Or edit .env file:export API_ID="your_id" API_HASH="your_hash" SESSION="your_session" BOT_TOKEN="your_token" FORCESUB="channel_name" AUTH="admin_id"
API_ID = 12345678 API_HASH = 1a2b3c4d5e6f7g8h9i BOT_TOKEN = 1234567890:ABCdefGhIJKLmnOpQRSTuvw SESSION = pyrogram_session_string FORCESUB = channel_username AUTH = 9876543210
Getting Started
Method 1: Start from Source Code
- Clone the Repository
git clone https://github.com/jadrian77/SaveRestrictedContentBot.git
- Install Dependencies
pip install -r requirements.txt
- Edit the .env file and fill in the obtained key
API_ID = ... ......
- Run the Project
python -m main
Method 2: Start from Pre-built Package
- Download Latest Release
wget -O "forward_bot.tar.gz" $(curl -s https://api.github.com/repos/jadrian77/SaveRestrictedContentBot/releases/latest | grep "browser_download_url" | cut -d '"' -f 4)
- Extract
tar -xf forward_bot.tar.gz
- Edit the .env file and fill in the obtained key
API_ID = ... ......
- Run
./manage_forward_bot.sh start
Additional configuration
In the config.ini file:
# Change the value as needed
SAVE_FILE
COPY_TO_CHANNEL
FAQ
- Q1: Q1: API_ID/HASH application failed?
Verify network connectivity and try different proxy nodes/browsers
- Q2: Connection timeout?
Confirm proxy settings or server's ability to reach Telegram services
- Back to Home: Home