Answer the question
In order to leave comments, you need to log in
Where is the error: telegram client for hosting?
Hey! Help a beginner.
I registered my client in the "API telegram client", wrote a simple code in python + Telethon.
from telethon.sync import TelegramClient
from telethon.sessions import StringSession
from settings import (API_ID, API_HASH, SESSION_STRING)
client = TelegramClient(StringSession(SESSION_STRING), API_ID, API_HASH)
client.start()
o_sebe=client.get_me().stringify()
f=open('mess_from_teleg.txt', 'a') # сначала откроем файл на запись
f.write(o_sebe)
f.flush()
f.close() # закроем файл после записи
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question