- Back to Home »
- Raspberry PI , Telegram »
- Telethon
Sunday, February 9, 2020
1.Giới thiệu
Telethon là Python 3 MTProto API Telegram client library.
Source code và hướng dẫn khác:
- https://docs.telethon.dev
2.Cài đặt và sử dụng
$pip3 install telethon
Chạy thử ví dụ demo:
Note:
Để làm được telegram app client cần phải có API ID, API hash, làm theo hướng dẫn từ trang chủ Telegram.
https://core.telegram.org/api/obtaining_api_id
Obtaining api_id
In order to obtain an API id and develop your own application using the Telegram API you need to do the following:
(1)Sign up for Telegram using any application.
(2)Log in to your Telegram core: https://my.telegram.org.
(3)Go to 'API development tools' and fill out the form.
(4)You will get basic addresses as well as the api_id and api_hash parameters required for user authorization.
(5)For the moment each number can only have one api_id connected to it.
We will be sending important developer notifications to the phone number that you use in this process, so please use an up-to-date number connected to your active Telegram account.