GithubHelp home page GithubHelp logo

strix007 / telethon-channel-twilio-alert Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 1.0 36 KB

Listen to channel messages using the telethon python library and alert the user using the twilio library

Python 100.00%

telethon-channel-twilio-alert's Introduction

Telethon-channel-twilio-alert

Listen to channel messages using the telethon python library and alert the user using the twilio library.

Table of Contents

About

This script utilizes the Telethon and Twilio Python libraries to monitor messages on a designated channel. When a message containing a specified keyword is detected, it triggers an SMS notification.

Requirements

Telegram API Token

Obtaining API Tokens for Telegram Account

Create a Telegram application:

  • Go to the Telegram website and log in with your Telegram account.
  • Once logged in, go to the API development tools page.
  • Fill out the required fields (name, description, etc.) to create a new application.

Obtain your API credentials:

  • After creating the application, you’ll receive an api_id and api_hash. These are your credentials to access the Telegram API.

Twilio Credentials

Obtaining API Tokens for Twilio Account

Sign up or log in to Twilio:

  • If you don’t have a Twilio account yet, sign up for one at Twilio’s website.
  • If you already have an account, log in using your credentials.

Navigate to the Console:

  • Once logged in, go to the Twilio Console by clicking on the Console link at the top right corner of the page.

Access API credentials:

  • From the Twilio Console, copy the Account SID , Auth Token and My Twilio phone number. These are the credentials required for our script.

What To Install

Setup

  • Clone the script on your local machine

    git clone https://github.com/Strix007/telethon-channel-twilio-alert.git

  • CD into the directory

    cd telethon-channel-twilio-alert

  • Run Poetry

    poetry install

  • Run the script

    poetry python run listener.py

First Run

Upon the initial execution, the script will prompt you to provide details such as your Telegram phone number, which will trigger the delivery of a one-time password (OTP). Subsequently, you’ll be asked to input credentials for both the Telegram and Twilio APIs, along with additional information like preferred keywords for inclusion/exclusion, the designated alert recipient’s number, and the accompanying message. These prompts only occur during the first run of the script; subsequent executions won’t require you to provide these details again.

Contributions

Contributions such as PRs and Issues are awlays welcome and highly encouraged.

telethon-channel-twilio-alert's People

Contributors

strix007 avatar almas-ashruff avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

almas-ashruff

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.