【发布时间】:2021-06-12 20:42:19
【问题描述】:
如何查看我的所有联系人并向他们发送消息? 我使用 Telethon(API 电报 python)。
from telethon.tl.functions.contacts import ResolveUsernameRequest
from telethon.tl.types import InputChannelEmpty
from telethon import TelegramClient
from telethon.tl.types.messages import Messages
from telethon.tl.types.contacts import Contacts
api_id = 1****
api_hash = '5fbd2d************************'
client = TelegramClient('arta0', api_id, api_hash)
client.connect()
【问题讨论】:
-
不要在此处粘贴您的 api_hash 和 id。它可以被滥用。
标签: python api telegram telethon