Telethon: account banned

Created on 29 May 2018  ·  128Comments  ·  Source: LonamiWebs/Telethon

When using the library, the account is immediately banished
How to avoid this?


(edit from @Lonami)

For everyone still coming here, see my comment:

Even official applications have these problems, not only libraries. Bans probably depend on a lot of factors, such as country, IP, use of the application, maybe even some random bans to accounts so people who care recover them and spambots won't bother with emails so those are gone, etc. For completeness sake:

Emails: [email protected], [email protected].

If those don't work, [email protected], https://telegram.org/support and DM to https://twitter.com/smstelegram may be worth trying.

Most helpful comment

By the way, everyone affected can try sending a message to [email protected] to get the phone numbers back.

All 128 comments

I have never had this issue. Maybe Telegram restricts new apps. Maybe you're using a virtual phone number. Maybe it's location based.

Did you ever get unbanned?

@mike-johnson-jr
began to use a proxy, and use an older version of the library, the latest version 0.19 immediately banned the account from me

the latest version 0.19 immediately banned the account from me

It would be wonderful if you could find out what version starts to "ban your phones"… I really doubt the version matters.

@GoldenEagle66 what version are you using? and how are you using a proxy? do you think it may be location based? I tried signing up again multiple times on various US phone numbers and kept getting banned, with Telethon and with other libraries too

@Lonami
if I work with 0.19 then right away I get the ban on authorization, at 0.18. + everything works well
@mike-johnson-jr
I use the version 0.18. + and the ipv4 proxy, I would like to try more on ipv6 but not any examples found

I downgraded to Telethon 0.18 and I no longer get banned

Would you mind trying to upgrade one by one version until you got banned so we can find what version "breaks" it?

I keep having to register new telephone numbers for testing. I've done so about 10 times now. I'd rather not continue to abuse their (and the telephone number app's) system by evading their bans and using their systems in a ways that were not originally intended.

Right… but I won't be maintaining an old version.

I'll get back to you on this.

I installed 0.18.3, started client from session started on 0.18, no problems

Thanks, the closer the working and failing versions, the easier to find what could have started causing these bans…

I installed 0.19.0.1 and I get the ban immediately after authorization. I don't use proxy or virtual phone number.

So the issue must be somewhere in https://github.com/LonamiWebs/Telethon/compare/v0.18.3...v0.19 I guess?

0.18.3 is right before 0.19.

After reviewing the changes with @sovietspaceship, we think the most possible change in there is the change from layer 75 to layer 76. The layer75 branch reverts the current layer back to 75. @mike-johnson-jr would you mind testing this version? You can install it through pip with:

pip install --upgrade git+https://github.com/LonamiWebs/Telethon@layer75

the last working version after which I do not get a ban is 0.18.3

@GoldenEagle66 yes, like @mike-johnson-jr pointed out. I'm now asking him (or anyone) to try installing the version suggested by my previous comment.

@GoldenEagle66 @mike-johnson-jr how and were would it be possible to get some test phone numbers so I could try this out myself? I need some phone numbers if we want to tackle this issue.

If you could also provide some of the numbers that have already been banned, that would be helpful. Feel free to message them privately to me.

@Lonami I think he used the "TextFree" app on Android. Good luck!

@Lonami today I'll try the code from your link I use the Russian SMS acceptance service :
sms-activate

@remixsan thanks, I had tried "Text Now" before.
@GoldenEagle66 can you still give me the phone number of a banned phone?

I get this error when trying to import TelegramClient after installing git+https://github.com/LonamiWebs/Telethon@layer75:

>>> from telethon import TelegramClient
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python36\lib\site-packages\telethon\__init__.py", line 2, in <module>

    from .telegram_bare_client import TelegramBareClient
  File "C:\Python36\lib\site-packages\telethon\telegram_bare_client.py", line 9,
 in <module>
    from . import version, utils
  File "C:\Python36\lib\site-packages\telethon\utils.py", line 13, in <module>
    from .tl.types import (
ImportError: cannot import name 'InputDialogPeer'

Right. Will fix in a bit.

@mike-johnson-jr please run pip install --no-cache --upgrade git+https://github.com/LonamiWebs/Telethon@layer75 and try again.

I need to wait 3 more hours before I can login again.

@Lonami That version works, I was banned an hour ago instantly after singing in using the latest version from the repo and emailed support and was unbanned. Just used your layer75 branch and no ban. Seems to be an issue with layer76.

Thanks, that's great to know. I guess I'll revert master to use that layer until this is "sorted out". Better to lag a bit behind than to ban new accounts, I guess?

@nikita what's their email? i used their support form and they never got back with me

@mike-johnson-jr I used the support email when attempting to sign into the app on iOS. It gives you a button to click to email. Email is [email protected].

@Lonami I got banned after upgrading to layer75, but it wasn't immediate; i was banned overnight

@mike-johnson-jr @Lonami
and what right now is a stable version and how can u download?

This morning and found a large number of account blocked, let me very confused, I began to look for problems, find new registered account will be blocked immediately after the authorization of using the API test a lot of methods, change the IP, switch the telethon version for 0.8.13, are the same, I think may be the telethon problem, and then I used the danog/MadelineProto does not have this kind of situation @Lonami

@Lonami will there be some solutions to the problem?

After some more discussion with other developers, it might also be the case that Telegram simply became more strict banning some phone numbers. Maybe some of you were lucky when trying old versions. Maybe some of you were lucky when trying other libraries, like the mentioned MadelineProto. I thought the layer change could be the problem, but it might as well be pure chance.

@Lonami I checked more than 10 numbers of different countries, and by 0.19 the result is always one

I don't know, @danog isn't doing any magic he said. I reviewed the changes between v0.18.3 and v0.19 and I couldn't find any big change.

I'll ask again:
@GoldenEagle66 @mike-johnson-jr how and were would it be possible to get some test phone numbers so I could try this out myself? I need some phone numbers if we want to tackle this issue.

If you could also provide some of the numbers that have already been banned, that would be helpful. Feel free to message them privately to me.

Well, I just went to https://github.com/telegramdesktop/tdesktop/blob/dev/Telegram/Resources/scheme.tl to grab the latest scheme.tl version and…

80be464 2 days ago
@john-preston Handle ToS correctly when signing up.

That might be the cause?

@Lonami I can provide a sealed account

@mrzxy I just need the number.

@Lonami +8617133864946

Reopen if said commit doesn't fix this issue.

@Lonami how to download the version for the test?)

I will release v0.19.1 shortly.

@Lonami
in the new version :
telethon.errors.rpc_error_list.AuthKeyUnregisteredError: The key is not registered in the system

Are you sure you called .start()?

@Lonami no, I called

         number = app.textBox("manual registration", "Enter phone number", parent=None)
         self.client.send_code_request(number)
         code = app.textBox("manual registration", "Enter a code", parent=None)
         me = self.client.sign_up(code, 'parser', 'pars')

Well that should have worked I guess…

Right now I'll try without Tkinter

Oh, did you call self.client.connect?

Yes

class Telegram():
    def __init__(self,proxy,chat):
        if chat != '':
            self.chat = chat.split(',')
            if len(chat) < 1:
                self.chat = [chat]
        if proxy != '':
            proxy = proxy.split(':')
            self.proxy = (socks.HTTP, proxy[0], int(proxy[1]), True, proxy[2], proxy[3])
        self.client = TelegramClient('session.session', api_id, api_hash,proxy=self.proxy)
        self.client.connect()
        if not self.client.is_user_authorized():
            self.client.start()
            #self.client.disconnect()
            #number = app.textBox("Ручная регистрация", "Введите номер телефона", parent=None)
            #self.client.send_code_request(number)
            #code = app.textBox("Ручная регистрация", "Введите код", parent=None)
            #me = self.client.sign_up(code, 'parser', 'pars')
        if self.client.is_user_authorized():
            Log('Авторизовались')
            try:
                os.remove("db.sqlite")
            except Exception as e:
                print(str(e))

@GoldenEagle66 okay the request needs to be moved, I couldn't test this before.

@Lonami did not quite understand what you are talking about.

@Lonami can I download updates?

@Lonami v0.19.1.2

Please enter your phone: +77082269391
Please enter the code you received: 85690
By signing up you agree to Telegram's TOS:
By signing up for Telegram, you agree not to:

- Use our service to send spam or scam users.
- Promote violence on publicly viewable Telegram bots, groups or channels.
- Post pornographic content on publicly viewable Telegram bots, groups or channels.

We reserve the right to update these Terms of Service later.
Traceback (most recent call last):
  File "H:\Soft PC\JetBrains\PyCharm 2017.2\helpers\pydev\pydevd.py", line 1596, in <module>
    globals = debugger.run(setup['file'], None, None, is_module)
  File "H:\Soft PC\JetBrains\PyCharm 2017.2\helpers\pydev\pydevd.py", line 1023, in run
    pydev_imports.execfile(file, globals, locals)  # execute the script
  File "H:\Soft PC\JetBrains\PyCharm 2017.2\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
    exec(compile(contents+"\n", file, 'exec'), glob, loc)
  File "C:/Users/Захар/PycharmProjects/testtelegram/test.py", line 13, in <module>
    client.start()
  File "C:\Python36-32\lib\site-packages\telethon\telegram_client.py", line 351, in start
    me = self.sign_up(code_callback(), first_name, last_name)
  File "C:\Python36-32\lib\site-packages\telethon\telegram_client.py", line 509, in sign_up
    self(AcceptTermsOfServiceRequest(self._tos.id))
  File "C:\Python36-32\lib\site-packages\telethon\telegram_bare_client.py", line 486, in __call__
    result = self._invoke(call_receive, request, ordered=ordered)
  File "C:\Python36-32\lib\site-packages\telethon\telegram_bare_client.py", line 583, in _invoke
    raise next(x.rpc_error for x in requests if x.rpc_error)
telethon.errors.rpc_error_list.AuthKeyUnregisteredError: The key is not registered in the system

Process finished with exit code 1

I haven't published a fix yet. More things are broken right now.

my code that causes an error above

from telethon import TelegramClient
import socks

api_id = 13682
#api_id = 253798
api_hash = 'de37bcf00f4688de900510f4f87384bb'
#api_hash = 'd806c9ed3eb74a233d58cb4a072a68f0'

proxy = (socks.HTTP, "185.91.172.88", int("22862"), True, "0jUpbFCSro", "2PODoxlIcj")
client = TelegramClient('session.session', api_id, api_hash, proxy=proxy)
client.connect()
if not client.is_user_authorized():
    client.start()
    if client.is_user_authorized():
        print("good")
else:
    print("good")

@Lonami tried different versions of the error one

I'm telling you to first wait.

@Lonami well expect, ready to test

Alright. v0.19.1.3 is out, upgrade again and try…

@Lonami
image

@GoldenEagle66 --no-cache

excellent! all earned, registration - exactly, right now I'll check the rest

@Lonami
there is also no registration, but after the session is created and the second session is deleted, the session is deleted

I can register a session and throw you off

@Lonami

debug at registration :
[Thread-1/INFO, 2018-06-03 18:58:21,567] telethon.telegram_bare_client:202: Connecting to 149.154.167.51:443...
[Thread-1/INFO, 2018-06-03 18:58:21,707] telethon.telegram_bare_client:208: Connection success!
[Thread-1/DEBUG, 2018-06-03 18:58:21,707] telethon.telegram_bare_client:481: Invoking GetStateRequest
[Thread-1/INFO, 2018-06-03 18:58:21,707] telethon.telegram_bare_client:517: Need to generate new auth key before invoking
[Thread-1/INFO, 2018-06-03 18:58:22,789] telethon.telegram_bare_client:523: Initializing a new connection while invoking
[Thread-1/DEBUG, 2018-06-03 18:58:22,790] telethon.network.mtproto_sender:112: Sending requests with IDs: InvokeWithLayerRequest: 6562888281183930412
[Thread-1/DEBUG, 2018-06-03 18:58:22,874] telethon.network.mtproto_sender:248: Processing BadServerSalt result
[Thread-1/DEBUG, 2018-06-03 18:58:22,889] telethon.network.mtproto_sender:112: Sending requests with IDs: InvokeWithLayerRequest: 6562888281579142584
[Thread-1/DEBUG, 2018-06-03 18:58:22,987] telethon.network.mtproto_sender:233: Processing container result
[Thread-1/DEBUG, 2018-06-03 18:58:22,987] telethon.network.mtproto_sender:248: Processing NewSessionCreated result
[Thread-1/DEBUG, 2018-06-03 18:58:22,987] telethon.network.mtproto_sender:248: Processing MsgsAck result
[Thread-1/DEBUG, 2018-06-03 18:58:23,018] telethon.network.mtproto_sender:229: Processing Remote Procedure Call result
[Thread-1/DEBUG, 2018-06-03 18:58:23,018] telethon.network.mtproto_sender:508: Received response for request with ID 6562888281579142584
[Thread-1/DEBUG, 2018-06-03 18:58:23,026] telethon.network.mtproto_sender:531: Confirmed InvokeWithLayerRequest through error The key is not registered in the system
[Thread-1/DEBUG, 2018-06-03 18:58:25,076] telethon.telegram_bare_client:481: Invoking SendCodeRequest
[Thread-1/DEBUG, 2018-06-03 18:58:25,076] telethon.network.mtproto_sender:112: Sending requests with IDs: SendCodeRequest: 6562888291213113688
[Thread-1/DEBUG, 2018-06-03 18:58:25,179] telethon.network.mtproto_sender:229: Processing Remote Procedure Call result
[Thread-1/DEBUG, 2018-06-03 18:58:25,179] telethon.network.mtproto_sender:508: Received response for request with ID 6562888291213113688
[Thread-1/DEBUG, 2018-06-03 18:58:25,193] telethon.network.mtproto_sender:531: Confirmed SendCodeRequest through error The source IP address is associated with DC 5
[Thread-1/DEBUG, 2018-06-03 18:58:25,193] telethon.telegram_bare_client:481: Invoking GetConfigRequest
[Thread-1/DEBUG, 2018-06-03 18:58:25,193] telethon.network.mtproto_sender:112: Sending requests with IDs: GetConfigRequest: 6562888291681139848
[Thread-1/DEBUG, 2018-06-03 18:58:25,360] telethon.network.mtproto_sender:229: Processing Remote Procedure Call result
[Thread-1/DEBUG, 2018-06-03 18:58:25,360] telethon.network.mtproto_sender:508: Received response for request with ID 6562888291681139848
[Thread-1/DEBUG, 2018-06-03 18:58:25,362] telethon.network.mtproto_sender:547: Confirmed GetConfigRequest through normal result Config
[Thread-1/INFO, 2018-06-03 18:58:25,362] telethon.telegram_bare_client:308: Reconnecting to new data center DcOption(id=5, ip_address='91.108.56.104', port=443, ipv6=False, media_only=False, tcpo_only=False, cdn=False, static=False, secret=None)
[Thread-1/INFO, 2018-06-03 18:58:25,382] telethon.telegram_bare_client:267: Disconnecting...
[Thread-1/DEBUG, 2018-06-03 18:58:25,382] telethon.telegram_bare_client:270: Stopping all workers...
[Thread-1/DEBUG, 2018-06-03 18:58:25,382] telethon.telegram_bare_client:275: Disconnecting the socket...
[Thread-1/INFO, 2018-06-03 18:58:25,382] telethon.network.mtproto_sender:80: Disconnecting MtProtoSender...
[Thread-1/INFO, 2018-06-03 18:58:25,397] telethon.telegram_bare_client:202: Connecting to 91.108.56.104:443...
[Thread-1/INFO, 2018-06-03 18:58:25,670] telethon.telegram_bare_client:208: Connection success!
[Thread-1/INFO, 2018-06-03 18:58:25,686] telethon.telegram_bare_client:517: Need to generate new auth key before invoking
[Thread-1/INFO, 2018-06-03 18:58:27,408] telethon.telegram_bare_client:523: Initializing a new connection while invoking
[Thread-1/DEBUG, 2018-06-03 18:58:27,408] telethon.network.mtproto_sender:112: Sending requests with IDs: InvokeWithLayerRequest: 6562888301128166344
[Thread-1/DEBUG, 2018-06-03 18:58:27,656] telethon.network.mtproto_sender:248: Processing BadServerSalt result
[Thread-1/DEBUG, 2018-06-03 18:58:27,672] telethon.network.mtproto_sender:112: Sending requests with IDs: InvokeWithLayerRequest: 6562888302185777812
[Thread-1/DEBUG, 2018-06-03 18:58:27,920] telethon.network.mtproto_sender:233: Processing container result
[Thread-1/DEBUG, 2018-06-03 18:58:27,920] telethon.network.mtproto_sender:248: Processing NewSessionCreated result
[Thread-1/DEBUG, 2018-06-03 18:58:27,920] telethon.network.mtproto_sender:248: Processing MsgsAck result
[Thread-1/DEBUG, 2018-06-03 18:58:27,951] telethon.network.mtproto_sender:229: Processing Remote Procedure Call result
[Thread-1/DEBUG, 2018-06-03 18:58:27,951] telethon.network.mtproto_sender:508: Received response for request with ID 6562888302185777812
[Thread-1/DEBUG, 2018-06-03 18:58:27,951] telethon.network.mtproto_sender:547: Confirmed InvokeWithLayerRequest through normal result SentCode
[Thread-1/DEBUG, 2018-06-03 18:58:27,951] telethon.telegram_bare_client:481: Invoking ResendCodeRequest
[Thread-1/DEBUG, 2018-06-03 18:58:27,951] telethon.network.mtproto_sender:112: Sending requests with IDs: ResendCodeRequest: 6562888303300996928
[Thread-1/DEBUG, 2018-06-03 18:58:28,207] telethon.network.mtproto_sender:229: Processing Remote Procedure Call result
[Thread-1/DEBUG, 2018-06-03 18:58:28,207] telethon.network.mtproto_sender:508: Received response for request with ID 6562888303300996928
[Thread-1/DEBUG, 2018-06-03 18:58:28,208] telethon.network.mtproto_sender:547: Confirmed ResendCodeRequest through normal result SentCode
By signing up for Telegram, you agree not to:

  • Use our service to send spam or scam users.
  • Promote violence on publicly viewable Telegram bots, groups or channels.
  • Post pornographic content on publicly viewable Telegram bots, groups or channels.

We reserve the right to update these Terms of Service later.
[Thread-1/DEBUG, 2018-06-03 18:59:59,969] telethon.telegram_bare_client:481: Invoking SignUpRequest
[Thread-1/DEBUG, 2018-06-03 18:59:59,970] telethon.network.mtproto_sender:112: Sending requests with IDs: SignUpRequest: 6562888698515059348
[Thread-1/DEBUG, 2018-06-03 19:00:00,431] telethon.network.mtproto_sender:229: Processing Remote Procedure Call result
[Thread-1/DEBUG, 2018-06-03 19:00:00,431] telethon.network.mtproto_sender:508: Received response for request with ID 6562888698515059348
[Thread-1/DEBUG, 2018-06-03 19:00:00,431] telethon.network.mtproto_sender:547: Confirmed SignUpRequest through normal result Authorization
[Thread-1/DEBUG, 2018-06-03 19:00:00,431] telethon.telegram_bare_client:481: Invoking AcceptTermsOfServiceRequest
[Thread-1/DEBUG, 2018-06-03 19:00:00,432] telethon.network.mtproto_sender:112: Sending requests with IDs: AcceptTermsOfServiceRequest: 6562888700658133028
[Thread-1/DEBUG, 2018-06-03 19:00:00,674] telethon.network.mtproto_sender:229: Processing Remote Procedure Call result
[Thread-1/DEBUG, 2018-06-03 19:00:00,674] telethon.network.mtproto_sender:508: Received response for request with ID 6562888700658133028
[Thread-1/DEBUG, 2018-06-03 19:00:00,675] telethon.network.mtproto_sender:547: Confirmed AcceptTermsOfServiceRequest through normal result bool
[ReadThread/INFO, 2018-06-03 19:00:00,675] telethon.telegram_bare_client:679: Starting to wait for items from the network
[Thread-1/DEBUG, 2018-06-03 19:00:00,676] telethon.telegram_bare_client:481: Invoking UpdateProfileRequest
[ReadThread/DEBUG, 2018-06-03 19:00:00,676] telethon.network.mtproto_sender:112: Sending requests with IDs: PingRequest: 6562888701634189128
[Thread-1/DEBUG, 2018-06-03 19:00:00,677] telethon.network.mtproto_sender:112: Sending requests with IDs: UpdateProfileRequest: 6562888701638188836
[ReadThread/DEBUG, 2018-06-03 19:00:00,680] telethon.telegram_bare_client:695: Receiving items from the network...
[ReadThread/DEBUG, 2018-06-03 19:00:00,909] telethon.network.mtproto_sender:248: Processing Pong result
[ReadThread/DEBUG, 2018-06-03 19:00:00,909] telethon.network.mtproto_sender:373: Confirmed PingRequest through pong
[ReadThread/DEBUG, 2018-06-03 19:00:00,910] telethon.telegram_bare_client:695: Receiving items from the network...
[ReadThread/DEBUG, 2018-06-03 19:00:00,947] telethon.network.mtproto_sender:229: Processing Remote Procedure Call result
[ReadThread/DEBUG, 2018-06-03 19:00:00,947] telethon.network.mtproto_sender:508: Received response for request with ID 6562888701638188836
[ReadThread/DEBUG, 2018-06-03 19:00:00,947] telethon.network.mtproto_sender:547: Confirmed UpdateProfileRequest through normal result User
[ReadThread/DEBUG, 2018-06-03 19:00:00,948] telethon.telegram_bare_client:695: Receiving items from the network...
[Thread-1/DEBUG, 2018-06-03 19:00:01,035] telethon.telegram_bare_client:481: Invoking GetUsersRequest
[Thread-1/DEBUG, 2018-06-03 19:00:01,035] telethon.network.mtproto_sender:112: Sending requests with IDs: GetUsersRequest: 6562888703365237356
[ReadThread/DEBUG, 2018-06-03 19:00:01,319] telethon.network.mtproto_sender:229: Processing Remote Procedure Call result
[ReadThread/DEBUG, 2018-06-03 19:00:01,319] telethon.network.mtproto_sender:508: Received response for request with ID 6562888703365237356
[ReadThread/DEBUG, 2018-06-03 19:00:01,339] telethon.network.mtproto_sender:547: Confirmed GetUsersRequest through normal result list
[ReadThread/DEBUG, 2018-06-03 19:00:01,339] telethon.telegram_bare_client:695: Receiving items from the network...
[Thread-1/DEBUG, 2018-06-03 19:00:01,340] telethon.telegram_bare_client:481: Invoking UpdateUsernameRequest
[Thread-1/DEBUG, 2018-06-03 19:00:01,340] telethon.network.mtproto_sender:112: Sending requests with IDs: UpdateUsernameRequest: 6562888704585308196
[ReadThread/DEBUG, 2018-06-03 19:00:01,771] telethon.network.mtproto_sender:229: Processing Remote Procedure Call result
[ReadThread/DEBUG, 2018-06-03 19:00:01,771] telethon.network.mtproto_sender:508: Received response for request with ID 6562888704585308196
[ReadThread/DEBUG, 2018-06-03 19:00:01,771] telethon.network.mtproto_sender:547: Confirmed UpdateUsernameRequest through normal result User
[ReadThread/DEBUG, 2018-06-03 19:00:01,772] telethon.telegram_bare_client:695: Receiving items from the network...
[ReadThread/DEBUG, 2018-06-03 19:00:01,774] telethon.network.mtproto_sender:248: Processing UpdateShort result
[ReadThread/DEBUG, 2018-06-03 19:00:01,774] telethon.telegram_bare_client:695: Receiving items from the network...
[Thread-1/INFO, 2018-06-03 19:00:04,898] telethon.telegram_bare_client:267: Disconnecting...
[Thread-1/DEBUG, 2018-06-03 19:00:04,898] telethon.telegram_bare_client:270: Stopping all workers...
[Thread-1/DEBUG, 2018-06-03 19:00:04,898] telethon.telegram_bare_client:275: Disconnecting the socket...
[Thread-1/INFO, 2018-06-03 19:00:04,898] telethon.network.mtproto_sender:80: Disconnecting MtProtoSender...
[ReadThread/INFO, 2018-06-03 19:00:04,899] telethon.telegram_bare_client:720: Connection closed by the user, not reading anymore

debugg at work :
[Thread-1/INFO, 2018-06-03 19:04:08,361] telethon.telegram_bare_client:202: Connecting to 91.108.56.104:443...
[Thread-1/INFO, 2018-06-03 19:04:08,659] telethon.telegram_bare_client:208: Connection success!
[Thread-1/DEBUG, 2018-06-03 19:04:08,659] telethon.telegram_bare_client:481: Invoking GetStateRequest
[Thread-1/INFO, 2018-06-03 19:04:08,659] telethon.telegram_bare_client:523: Initializing a new connection while invoking
[Thread-1/DEBUG, 2018-06-03 19:04:08,659] telethon.network.mtproto_sender:112: Sending requests with IDs: InvokeWithLayerRequest: 6562889766715456092
[Thread-1/DEBUG, 2018-06-03 19:04:08,887] telethon.network.mtproto_sender:248: Processing BadServerSalt result
[Thread-1/DEBUG, 2018-06-03 19:04:08,887] telethon.network.mtproto_sender:112: Sending requests with IDs: InvokeWithLayerRequest: 6562889767629078948
[Thread-1/DEBUG, 2018-06-03 19:04:09,128] telethon.network.mtproto_sender:233: Processing container result
[Thread-1/DEBUG, 2018-06-03 19:04:09,128] telethon.network.mtproto_sender:248: Processing NewSessionCreated result
[Thread-1/DEBUG, 2018-06-03 19:04:09,128] telethon.network.mtproto_sender:248: Processing MsgsAck result
[Thread-1/DEBUG, 2018-06-03 19:04:09,159] telethon.network.mtproto_sender:229: Processing Remote Procedure Call result
[Thread-1/DEBUG, 2018-06-03 19:04:09,159] telethon.network.mtproto_sender:508: Received response for request with ID 6562889767629078948
[Thread-1/DEBUG, 2018-06-03 19:04:09,165] telethon.network.mtproto_sender:531: Confirmed InvokeWithLayerRequest through error The user has been deleted/deactivated
[Thread-1/INFO, 2018-06-03 19:04:09,166] telethon.telegram_bare_client:267: Disconnecting...
[Thread-1/DEBUG, 2018-06-03 19:04:09,166] telethon.telegram_bare_client:270: Stopping all workers...
[Thread-1/DEBUG, 2018-06-03 19:04:09,166] telethon.telegram_bare_client:275: Disconnecting the socket...
[Thread-1/INFO, 2018-06-03 19:04:09,166] telethon.network.mtproto_sender:80: Disconnecting MtProtoSender...

Do you mean there is no ban at registration? And why are you deleting sessions?

@mike-johnson-jr seems to have solved the problem, the problem was in api_id

need good apps
image

So 0.19.1.3 is confirmed not to cause bans now?

@mike-johnson-jr
no unconfirmed

0.19.1.3 did not cause a ban for me

Wow, this actually is quite a known issue. I wish I saw this thread two days ago, when I got my number banned.

So ATM can we consider 0.19.1.3 stable in the sense of bans? Please share your results. I will do as soon as my login timeout expires.

Btw, just FYI, I didn't have any issues on my main long-used number whatsoever. On the other hand I got instabanned upon connecting via telethon on a new virtual number which was never used for communication. Thus I think, the use time might also be the ban criteria - if the number was just registered and you immediately use API on it, their algos might consider that the spamming software usage pattern.

By the way, everyone affected can try sending a message to [email protected] to get the phone numbers back.

Thanks for the info. Did you have any success with it?

What I tried was writing to [email protected], https://telegram.org/support and DM to https://twitter.com/smstelegram
And guess what? Right, nothing.

I am also

Another email you could try: [email protected]. It's the address you get after tapping "Help" on DrKLO's Android client. For example:

I'm trying to use my mobile phone number: phone
But Telegram says it's banned. Please help.

App version: 4.8.9 (12617)
OS version: SDK version number
Device Name: model
Locale: en

Just got banned on 0.19.1.4 after registering via official app on real number =/
So @unconditional version might be the case (I also have my main long-used account connected without any problems)

Same to me. Got banned 3 hours after upgrading to master branch

In [4]: telethon.__version__
Out[4]: '0.19.1'

I needed upgrade because of DraftMessageEmpty problem

import telethon telethon.__version__ '0.19.1.6'
Same to me. Got banned
i use proxy,ipv4,and loggin,nothing todo,then banned.what haapend to me?
by the way,i use interactive_telegram_client.py from example

I have no idea what phones or activities everyone getting banned is doing but I have never had this issue. While I really doubt high versions are an issue, it's very improbable. Everyone having this issue can:

git clone https://github.com/LonamiWebs/Telethon
cd Telethon
git checkout v0.17  # or any other version

And then just edit telethon/tl/custom/draft.py with this change. Use whatever version worked for you with the draft fix.

We're trying to get big tiddy gf obviously. Will check your advice, thanks

I used the 0.19.1.4 version, I tried to register for 1000+, I switched proxy every time I registered, used 14 api_id, but I was gradually sealed, I can not find the reason。

I wrote to [email protected], they replied after two days and my numbers were unbanned. Seems like ban was by mistake. Now I'm on 0.19.1.6, all works good.

I just started using Telethon a few days ago, along with telegram-export and I cannot get a full extraction to run once without getting banned. Tried several versions from 0.17 to current all with the same results. Burning through $1.99 Hushed app phone numbers right now. All I need is my list of users from two channels I am an admin of.

Pretty sure if you use an account that has existed for some weeks and you don't abuse it, it will be fine… There are even success stories of accounts being recovered like @overjoy said, in the worst case of getting your main account banned (which has never happened to me). Like I stated the version is very unlikely. It's probably how new the account is, maybe the location, and what you use it for. Perhaps even Telegram has a blacklist of proxies or IPs to disallow.

Yesterday I got banned too. Because I'm from Russia, I need to use proxy, so I used Tor as proxy, because I got tired of blocked or dead proxies.
Wrote script to upload screenshots to group chat, and got banned on one of launches. Wrote to both [email protected] and [email protected]. First one responded in ~5 hours, saying that issue was solved, and my account was unbanned. For some reason they didn't tell me about ban reasons.
Used Telethon 0.18.3 with, guess I should update.

I have tried to sign up telegram account with telethon(0.18.3 ->0.19.16) by proxy because the Chinese outer internet access bans for many times using inland phone number in the last and current months. But the result is DELETED ACCOUNT every single time, which get me puzzled and annoied enough to write to [email protected] for the reason. They confidently replied the factor is that the number I used is of the purpose to spam stranger.

Hehe, in their logics, whichever person I contact to is not a stranger for a new one registered, and in their Database Server, the only survivor is the first one registered, for the reason that to the second what he do is only spam to the first member and should be banned logically at any time when he send message to any one. So he is isolated with wasting time registering the account in vain.

My question is after I registered with telethon, please tell me which behavior is the right action to use the new account, and when I want to send information normally to an account I'm familiar how can I send a single message that will not be punished to be banned by telethon?

I believe you should just register applications through official clients, and wait for a bit before doing anything suspicious…

I correctly understood that need to use api_id and api_hash from the official client (for example android)?

Api seems to be quite useless now days - since all my accounts get instant banned. Doesn't matter what numbers i do use; USA/CHINA/RUSSIA - it doesn't affect the banrate at all..

Any help would be great.

Api seems to be quite useless now days

Always sorry to hear, but bear in mind it's Api as you said and not library. My account still has never received a ban. Telegram Server is deciding these bans. Just email their address if you really are making a legit use of their API.

Using an earlier version may help you. It helped me. Try 0.18.3

Hi.
I was wondering, is it the recovery departement of telegram ( [email protected] ) an official channel & official email? Since the way they respond, is literally like a twelve year old. There is not even a glance of professionality - their response on my emails are a big joke. Sorry if any of you do handle these emails, but step up your game and atleast be a bit polite and act like you really wanna help instead of being a big douche bag. Oh and the structure of sentences are terrible - sentences do end all of a sudden or there is a random ' , '.

So is it worth to email the recovery section, probably it is not. The employee literally told me that i was lazy since i didn't what (s)he told me to do, makes false conclusions based on thin air and basically acts like a big douche.

Btw @Lonami thanks for your help, though. You are heaven on earth if i do compare you with these telegram 'employees'.

Good luck with getting ur accounts back , everyone.

Is this shit on clients of other languages?

I used 1.2 and got banned yesterday for no reason, except downloading messages from a private channel I am in. Can it be because I logged in from both phone and server (which is not in my same location).
Have been using Telethon for two weeks (my account is 2 years old of personal usage). No idea what happened, no answer so far from support.

Answered from [email protected], ban removed but no explanation

i haven't this problem , but yesterday baned , without any spam !
after sign in with cmd , account banned quickly!
i don't know if there is problem in new version of telethon or not !

According to a TSF member TG does ban waves sometimes and they receive a loooot of complaints about those

From https://t.me/telethonofftopic/68512.

I also meet this problem that my account will be baned forever , My version is 1.0.4.
Anyone can tell me which version is safe?

the latest version 1.2 left a bundle of my accounts in the ban.
Numbers of the countries were different Kazakhstan ukraine nigeria china.
All mobile numbers have been blocked

hi.
Version 1.1.1 same problem. multi account's me banned. which version is health?

@masoudcom
I think no version is safe. Even official TDLib has problems like this.
Examples: tdlib/td#312, tdlib/td#340.
Just write to [email protected] to unban accounts.

Even official applications have these problems, not only libraries. Bans probably depend on a lot of factors, such as country, IP, use of the application, maybe even some random bans to accounts so people who care recover them and spambots won't bother with emails so those are gone, etc. For completeness sake:

Emails: [email protected], [email protected].

If those don't work, [email protected], https://telegram.org/support and DM to https://twitter.com/smstelegram may be worth trying.

I send email but after 2 days not answered to me😥.
Please help

I use Tor for access telgram, this service may occurred this prablem?

@Lonami, We tried to use Telethon twice in order to parse big chunk of data. I think that problem occurs with new/raw cellphone numbers which are getting used immediately for such called strange actions. Yet we are not sure whether it's Telethoni problem. We'll try to use different api wrapper for the same actions with the similar cellphone numbers. I'll answer asap after.

Read through the issue. Even legit applications can get banned.

its not related to the number, country or IP or or library version. Its related to the API key. Its gets dirty. simply use new api keys.

its not related to the number, country or IP or or library version. Its related to the API key

It most definitely is related to all things. VoIP numbers do seem to have a way higher probability of getting banned. Some legit SIM cards also get banned, so maybe IP/country comes into play, too. Or maybe they use the API key as well.

Can i ask a question !
What is your OS?

When using the library, the account is immediately banished
How to avoid this?

_(edit from @Lonami)_

For everyone still coming here, see my comment:

Even official applications have these problems, not only libraries. Bans probably depend on a lot of factors, such as country, IP, use of the application, maybe even some random bans to accounts so people who care recover them and spambots won't bother with emails so those are gone, etc. For completeness sake:
Emails: [email protected], [email protected].
If those don't work, [email protected], https://telegram.org/support and DM to https://twitter.com/smstelegram may be worth trying.

Used the account for 2 months in other clients.

But suddenly banned without any explicit reason when using this library.
I used proxy and client.send_message().
How to avoid future bans?
How long they took to remove bans?
I sent email

Using an earlier version may help you. It helped me. Try 0.18.3On Aug 5, 2018 10:57 AM, Lediedo notifications@github.com wrote:Api seems to be quite useless now days - since all my accounts get instant banned. Doesn't matter what numbers i do use; USA/CHINA/RUSSIA - it doesn't affect the banrate at all..
Any help would be great.

—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or mute the thread.

Using an earlier version may help you. It helped me. Try 0.18.3On Aug 5, 2018

seems like this worked
but where can i get documentation for this version?
why newer versions has banned accounts?

upd: phone banned

@Lonami i authorized with official tdlib and account still works (for the moment more than 16 hours)
telethon has very nice interface with async/await sytnax, but while phone numbers banned through telethon i am not able to use it in my app. it is very sad(

Ban removed in 7 hours

Try @Pegorino82

Ban removed in 7 hours

Try @Pegorino82

yes, i know this, but it is bad idea to tell new client that they will be banned for a while)

@Lonami i authorized with official tdlib and account still works (for the moment more than 16 hours)
telethon has very nice interface with async/await sytnax, but while phone numbers banned through telethon i am not able to use it in my app. it is very sad(

Account creation date?
What activities did u with the library?

@Lonami i authorized with official tdlib and account still works (for the moment more than 16 hours)
telethon has very nice interface with async/await sytnax, but while phone numbers banned through telethon i am not able to use it in my app. it is very sad(

Account creation date?
What activities did u with the library?

we prepared accounts for a week - create tg account and post messages, but when log in with app -> ban in few minutes
and app is not for spam or things like that
p.s. i had banned one my account and wrote to telegram and it is ok now/ but it is not good for clients

Hi all. I'm in the same ban-boat now. I have a few TG accounts on different systems, using Telethon 1.14.0 on all of them. Never got banned until a couple of weeks ago. Does anyone have a working v1.14.0 Telethon-based app running right now? I get banned right after successful login and suspect I'm not the only one getting banned. Not sure why TG is doing this or what triggers the ban, any help is greatly appreciated.

@izzzzzi @Lonami or anyone else have any luck in not getting banned after tweaking "app_version", "device_model", and/or "system_version"? Am I the only one getting banned at the moment? :) The two accounts that were banned were tied to Verizon Wireless cell phones if that counts as anything. Thanks.

My telegram accounts are also getting banned for a few weeks . Anybody got any solution...?

hello @Lonami

i test +10 accounts with v1.15.0 but all of them deleted in 1 minute.
i also tested v0.18.3 as @mikejohnsonjr said and use others api_id and api_hash as @izzzzzi said. but doesn't work.
i don't have this problem with official and unofficial apps.

i think the problem is coming from authentication method or from sync method used in telethon.

if you want i can give you few numbers for test.
and please reopen this issue. because it didn't solve yet.

need good apps
image

hello @izzzzzi
where did you get these apps?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

amir3code picture amir3code  ·  6Comments

ksanderer picture ksanderer  ·  3Comments

saeedesfandi picture saeedesfandi  ·  3Comments

pazis picture pazis  ·  5Comments

JackCloudman picture JackCloudman  ·  6Comments