简体   繁体   中英

Telegram Automation

I'm working on a program, it's mission is that we define some number for it (some of our mobile numbers) and it should register them in Telegram, and then gets all messages that send to that number. As you may know, the registration in Telegram needs providing a phone number and after that a validate the number by a code that is sent from Telegram.

I read Telegram API, but it was complex and with no certain example and explanation. I need your help, Thanks.

To implement Telegram chat,

  1. First of all, you should obtain your own api_id and api_hash as described here .
  2. Read the document and get ideas about the terms used in the Protocol which will be useful to go further.
  3. Create a TCP connection with Telegram Server via port 443.
  4. Telegram uses a key called 'Authorization Key' (ie Auth key) for Encryption/Decryption and it will be derived in both Server and Client using Diffie-Hellman Algorithm by various steps. You can create this Auth key by following the steps explained here and you can also see a sample for this process here .
  5. When you are successfully done all steps, you will finally receive 'dh_gen_ok' response from Telegram server.
  6. Now you can send RPC queries (Telegram APIs). The list of APIs is given in this link https://core.telegram.org/methods

This is just brief points which will help to give an idea about this. To implement the whole process, you need to read the documents and get to know the flow and all its limitations. Hope it helps :)

Yes you can do this
BUT
first of all, you should write a program (class) for one number
and after that create another instances of that class for another numbers
if you write main class (work by One phoneNumber)
it's very simple to extend you program to work by many numbers

Good Luck !!!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM