Answer the question
In order to leave comments, you need to log in
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
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 questionAsk a Question
731 491 924 answers to any question