A
A
adrenalinruslan2019-04-28 09:02:06
API
adrenalinruslan, 2019-04-28 09:02:06

How to get all Telegram dialogs?

Guys, is it possible to somehow get all my dialogs using the API and send messages?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Danil K., 2019-08-28
@Danya_Violet

Sending messages on your behalf
get.contacts() - get contacts
get_history() - get history
get_dialogs() - get dialogs

from pyrogram import Client

app = Client(
    session_name="pyro",
    proxy=dict(
        hostname="",
        port=1080,
        username="",
        password=""),
    api_id='',
    api_hash='')

app.start()

app.send_message(chat_id=1, text='Hi, Pavel')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question