LonamiWebs / Telethon

Pure Python 3 MTProto API Telegram client library, for bots too!
https://docs.telethon.dev
MIT License
9.64k stars 1.38k forks source link

account banned #824

Closed izzzzzi closed 6 years ago

izzzzzi commented 6 years ago

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: login@stel.com, recover@telegram.org.

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

Lonami commented 6 years ago

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

JMIdeaMaker commented 6 years ago

Did you ever get unbanned?

izzzzzi commented 6 years ago

@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

Lonami commented 6 years ago

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.

JMIdeaMaker commented 6 years ago

@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

izzzzzi commented 6 years ago

@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

JMIdeaMaker commented 6 years ago

I downgraded to Telethon 0.18 and I no longer get banned

Lonami commented 6 years ago

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

JMIdeaMaker commented 6 years ago

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.

Lonami commented 6 years ago

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

JMIdeaMaker commented 6 years ago

I'll get back to you on this.

JMIdeaMaker commented 6 years ago

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

Lonami commented 6 years ago

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

ksandr310 commented 6 years ago

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

Lonami commented 6 years ago

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

JMIdeaMaker commented 6 years ago

0.18.3 is right before 0.19.

Lonami commented 6 years ago

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
izzzzzi commented 6 years ago

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

Lonami commented 6 years ago

@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.

Lonami commented 6 years ago

@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.

remixsan commented 6 years ago

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

izzzzzi commented 6 years ago

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

Lonami commented 6 years ago

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

JMIdeaMaker commented 6 years ago

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'
Lonami commented 6 years ago

Right. Will fix in a bit.

Lonami commented 6 years ago

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

JMIdeaMaker commented 6 years ago

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

nikita commented 6 years ago

@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.

Lonami commented 6 years ago

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?

JMIdeaMaker commented 6 years ago

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

nikita commented 6 years ago

@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 login@stel.com.

JMIdeaMaker commented 6 years ago

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

izzzzzi commented 6 years ago

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

mrzxy commented 6 years ago

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

izzzzzi commented 6 years ago

@Lonami will there be some solutions to the problem?

Lonami commented 6 years ago

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.

izzzzzi commented 6 years ago

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

Lonami commented 6 years ago

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.

Lonami commented 6 years ago

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.

Lonami commented 6 years ago

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?

mrzxy commented 6 years ago

@Lonami I can provide a sealed account

Lonami commented 6 years ago

@mrzxy I just need the number.

mrzxy commented 6 years ago

@Lonami +8617133864946

Lonami commented 6 years ago

Reopen if said commit doesn't fix this issue.

izzzzzi commented 6 years ago

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

Lonami commented 6 years ago

I will release v0.19.1 shortly.

izzzzzi commented 6 years ago

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

Lonami commented 6 years ago

Are you sure you called .start()?

izzzzzi commented 6 years ago

@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')
Lonami commented 6 years ago

Well that should have worked I guess…