OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

''A wait of x seconds is required'' returns by telethon( python library for telegram) how can I get rid of it?

  • Thread starter Thread starter Ziviz Zaz
  • Start date Start date
Z

Ziviz Zaz

Guest
When I try to run code which is accessing my telegram account via an API, it runs fine until following error.

A wait of 4013 seconds is required (caused by ResolveUsernameRequest)

Error

My code is following:

Code:
from telethon.sync import TelegramClient
from telethon import functions, types

api_id = xxxxxxx
api_hash = '468f15380793dxxxxxxxxxxxxxxx'

with TelegramClient('sessionx', api_id, api_hash) as client:
    result = client(functions.channels.GetFullChannelRequest(
        channel='channelname'
    ))
    print(result.stringify())

Is there any solution, so I could get rid of it? What changes should I made into my code.
<p>When I try to run code which is accessing my telegram account via an API, it runs fine until following error.</p>
<p><code>A wait of 4013 seconds is required (caused by ResolveUsernameRequest)</code></p>
<p><a href="https://i.sstatic.net/PjNNh.png" rel="nofollow noreferrer">Error</a></p>
<p>My code is following:</p>
<pre><code>from telethon.sync import TelegramClient
from telethon import functions, types

api_id = xxxxxxx
api_hash = '468f15380793dxxxxxxxxxxxxxxx'

with TelegramClient('sessionx', api_id, api_hash) as client:
result = client(functions.channels.GetFullChannelRequest(
channel='channelname'
))
print(result.stringify())
</code></pre>
<p>Is there any solution, so I could get rid of it? What changes should I made into my code.</p>
 

Latest posts

M
Replies
0
Views
1
Mohit Pant
M
Top