(venv) root@th3wet:~/PROGREV_AKKOV# python test_tipo_work_scripta.py 
DEBUG:asyncio:Using selector: EpollSelector
INFO:telethon.network.mtprotosender:Connecting to 2001:67c:4e8:f002::a:443/TcpFull...
DEBUG:telethon.network.mtprotosender:Connection attempt 1...
DEBUG:telethon.network.mtprotosender:Connection success!
DEBUG:telethon.network.mtprotosender:New auth_key attempt 1...
DEBUG:telethon.network.mtprotosender:auth_key generation success!
DEBUG:telethon.network.mtprotosender:Starting send loop
DEBUG:telethon.network.mtprotosender:Starting receive loop
INFO:telethon.network.mtprotosender:Connection to 2001:67c:4e8:f002::a:443/TcpFull complete!
DEBUG:telethon.network.mtprotosender:Waiting for messages to send...
DEBUG:telethon.extensions.messagepacker:Assigned msg_id = 7527269685497544040 to InvokeWithLayerRequest (7fd5fa1187c0)
DEBUG:telethon.network.mtprotosender:Encrypting 1 message(s) in 80 bytes for sending
DEBUG:telethon.network.mtprotosender:Encrypted messages put in a queue to be sent
DEBUG:telethon.network.mtprotosender:Waiting for messages to send...
DEBUG:telethon.network.mtprotosender:Receiving items from the network...
DEBUG:telethon.network.mtprotosender:Handling bad salt for message 7527269685497544040
DEBUG:telethon.network.mtprotosender:1 message(s) will be resent
DEBUG:telethon.network.mtprotosender:Receiving items from the network...
DEBUG:telethon.extensions.messagepacker:Assigned msg_id = 7527269687023909916 to InvokeWithLayerRequest (7fd5fa1187c0)
DEBUG:telethon.network.mtprotosender:Encrypting 1 message(s) in 80 bytes for sending
DEBUG:telethon.network.mtprotosender:Encrypted messages put in a queue to be sent
DEBUG:telethon.network.mtprotosender:Waiting for messages to send...
DEBUG:telethon.extensions.messagepacker:Assigned msg_id = 7527269687024818768 to MsgsAck (7fd5fa11c700)
DEBUG:telethon.network.mtprotosender:Encrypting 1 message(s) in 36 bytes for sending
DEBUG:telethon.network.mtprotosender:Encrypted messages put in a queue to be sent
DEBUG:telethon.network.mtprotosender:Waiting for messages to send...
DEBUG:telethon.network.mtprotosender:Handling container
DEBUG:telethon.network.mtprotosender:Handling new session created
DEBUG:telethon.network.mtprotosender:Handling acknowledge for [7527269687023909916]
DEBUG:telethon.network.mtprotosender:Receiving items from the network...
DEBUG:telethon.network.mtprotosender:Handling RPC result for message 7527269687023909916
DEBUG:telethon.network.mtprotosender:Receiving items from the network...
DEBUG:telethon.extensions.messagepacker:Assigned msg_id = 7527269688941642156 to GetUsersRequest (7fd5fa07ce20)
DEBUG:telethon.network.mtprotosender:Encrypting 1 message(s) in 32 bytes for sending
DEBUG:telethon.network.mtprotosender:Encrypted messages put in a queue to be sent
DEBUG:telethon.network.mtprotosender:Waiting for messages to send...
DEBUG:telethon.extensions.messagepacker:Assigned msg_id = 7527269688942853324 to MsgsAck (7fd5fa118c10)
DEBUG:telethon.network.mtprotosender:Encrypting 1 message(s) in 60 bytes for sending
DEBUG:telethon.network.mtprotosender:Encrypted messages put in a queue to be sent
DEBUG:telethon.network.mtprotosender:Waiting for messages to send...
DEBUG:telethon.network.mtprotosender:Handling RPC result for message 7527269688941642156
DEBUG:telethon.network.mtprotosender:Receiving items from the network...
DEBUG:telethon.extensions.messagepacker:Assigned msg_id = 7527269690806618684 to MsgsAck (7fd5fa07cbb0)
DEBUG:telethon.network.mtprotosender:Encrypting 1 message(s) in 36 bytes for sending
DEBUG:telethon.network.mtprotosender:Encrypted messages put in a queue to be sent
DEBUG:telethon.network.mtprotosender:Waiting for messages to send...
DEBUG:telethon.extensions.messagepacker:Assigned msg_id = 7527269690807863228 to MsgsAck (7fd5fa1187c0)
DEBUG:telethon.network.mtprotosender:Encrypting 1 message(s) in 36 bytes for sending
DEBUG:telethon.network.mtprotosender:Encrypted messages put in a queue to be sent
DEBUG:telethon.network.mtprotosender:Waiting for messages to send...
DEBUG:telethon.extensions.messagepacker:Assigned msg_id = 7527269690811580652 to GetUsersRequest (7fd5fa07cb80)
DEBUG:telethon.network.mtprotosender:Encrypting 1 message(s) in 32 bytes for sending
DEBUG:telethon.network.mtprotosender:Encrypted messages put in a queue to be sent
DEBUG:telethon.network.mtprotosender:Waiting for messages to send...
DEBUG:telethon.network.mtprotosender:Handling RPC result for message 7527269690811580652
DEBUG:telethon.network.mtprotosender:Receiving items from the network...
DEBUG:telethon.extensions.messagepacker:Assigned msg_id = 7527269693093816752 to MsgsAck (7fd5fa07cd90)
DEBUG:telethon.network.mtprotosender:Encrypting 1 message(s) in 36 bytes for sending
DEBUG:telethon.network.mtprotosender:Encrypted messages put in a queue to be sent
DEBUG:telethon.network.mtprotosender:Waiting for messages to send...
DEBUG:telethon.extensions.messagepacker:Assigned msg_id = 7527269693094908708 to MsgsAck (7fd5fa07c6d0)
DEBUG:telethon.network.mtprotosender:Encrypting 1 message(s) in 36 bytes for sending
Please enter your phone (or bot token)


import python_socks
from telethon import TelegramClient
import asyncio
import logging

logging.basicConfig(level=logging.DEBUG)



api_id = 123
api_hash = '123'

proxy = {
    'proxy_type': python_socks.ProxyType.SOCKS5,  # (mandatory) protocol to use (see above)
    'addr': '191.101.224.123',  # (mandatory) proxy IP address
    'port': 14377,  # (mandatory) proxy port number
    'username': 'user273786',  # (optional) username if the proxy requires auth
    'password': 'qrflw8',  # (optional) password if the proxy requires auth
}

client = TelegramClient('7090492991.session', api_id, api_hash, proxy=proxy,use_ipv6=True)


async def main():
    # Getting information about yourself
    me = await client.get_me()

    # "me" is a user object. You can pretty-print
    # any Telegram object with the "stringify" method:
    print(me.stringify())

    print(me.phone)

    print("Статус установлен: В сети")

    # You can print all the dialogs/conversations that you are part of:
    async for dialog in client.iter_dialogs():
        print(dialog.name, 'has ID', dialog.id)

    # You can send messages to yourself...
    await client.send_message('me', 'Hello, myself!')


with client:
    client.loop.run_until_complete(main())


Сессия авторизована, почему я получаю Please enter your phone (or bot token):