English‐User‐Guide - jadrian77/SaveRestrictedContentBot GitHub Wiki

Table of Contents

  1. Prerequisites
  2. Getting Started
  3. FAQ

Prerequisites

Obtaining Required Keys

  • Step 1: Key Acquisition
    • API_ID & API_HASH

      1. Log in to Telegram API Platform
      2. Navigate to API Development Tools to create a new application
      3. Submit application details
    • Generate BOT_TOKEN

      • Create a bot via @BotFather and follow setup instructions
    • Generate SESSION String

      1. Visit Pyrogram Session Generator
      2. 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
    export API_ID="your_id" API_HASH="your_hash" SESSION="your_session"  BOT_TOKEN="your_token" FORCESUB="channel_name" AUTH="admin_id"
    
    Or edit .env file:
    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

  1. Clone the Repository
    git clone https://github.com/jadrian77/SaveRestrictedContentBot.git
    
  2. Install Dependencies
    pip install -r requirements.txt
    
  3. Edit the .env file and fill in the obtained key
    API_ID = ...
    ......
    
  4. Run the Project
    python -m main
    

Method 2: Start from Pre-built Package

  1. 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)
    
  2. Extract
    tar -xf forward_bot.tar.gz
    
  3. Edit the .env file and fill in the obtained key
    API_ID = ...
    ......
    
  4. 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