Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User has been deleted/deactivated #297

Closed
vegeta1k95 opened this issue Oct 5, 2017 · 29 comments
Closed

User has been deleted/deactivated #297

vegeta1k95 opened this issue Oct 5, 2017 · 29 comments

Comments

@vegeta1k95
Copy link
Contributor

For some reason users who were using my custom Telethon client got banned from Telegram.
What can be a possible reason behind this? Did anyone have similar problem and how you solved it?
I want to find a way to track what causes this and fix it.

@Lonami
Copy link
Member

Lonami commented Oct 5, 2017

What can be a possible reason behind this?

I actually don't know why you can be banned from Telegram, what reasons Telegram uses to determine whether it should ban someone, or what happens when someone is banned.

anyone have similar problem

I know some people has been banned too, yes. But I don't know how or why.

and how you solved it?

I'm not aware of any case where this has been solved.

I want to find a way to track what causes this and fix it.

Good luck!

@danog
Copy link

danog commented Oct 5, 2017

You probably got flood waited too many times, and got limited, then permalimited, and then banned.
Certain numbers from online SMS may cause a ban, too.

@alihossein
Copy link
Contributor

I have the same problem
I use virtual numbers.
Today, the telegram after a week has blocked my virtual numbers!
Does anyone know what sensitive telegram is?

@LonamiWebs LonamiWebs deleted a comment from pashbelg Oct 6, 2017
@Lonami
Copy link
Member

Lonami commented Oct 16, 2017

I've added this to the wiki. You can still use this issue for discussion.

@unconditional
Copy link

Just experianced this a day ago. I lost an account registered with a virtual number. And I'm pretty sure this is somehow related to the proxy/location and probably the period of time the account was in use: I was logged into my newly created account via proxy, connected to some channels, etc. and the very moment I lanched my app I got a notification in the mobile client and immediately got kicked out of the client and my app got disconnected as well with the message saying the number was banned.

@Lonami
Copy link
Member

Lonami commented Jun 5, 2018

@unconditional see #824.

@Jihante
Copy link

Jihante commented Jul 28, 2018

I register an account, but after restart (when the client uses .session) account is blocked. Why?

@sahads
Copy link

sahads commented Apr 22, 2021

i have also this problem anyone solve this ?

@SN3-K
Copy link

SN3-K commented Sep 2, 2021

A lot of the times, the telegram bans are related to your actions.

Telegram will not ban from :

Location
Proxy

Telegram hates voip numbers, get actual numbers, russia/india avoid for less strict limitations.

Telegram does specify only 3 accounts can be used per ip/proxy, this is very important, I have already tried rotating ip's and using the same proxies only 3 accounts at a time, if the proxy picks up too many bans, the rest will get banned as well.

if you are getting banned what I have noticed 7 seconds is a good number between requests, sometimes more or less.

Most bans you can check the time and it is 1 day, 7 days , or 30 days.

for me what I do is rotate out my proxies and my accounts, once 3 accounts attached to one proxy get banned for 1 days, I will rest them for 3 or 4, and they are "fresh" in telegrams eyes again

Anyone that's wants to compare notes, feel free to dm me... Maybe we should make a community telegram for discussing the limits we find within the Telegram api itself used by the Telethon sdk @Lonami . Imho it might keep the repeated questions off of the issues themselves, a tg they can ask and the community can easily respond to, just a thought. But overall Thanks for the awesome resource, this library is killer.

@danielrodcaball
Copy link

@TylerDotPy I have a Telegram bans related question, maybe I can get some insights based on your experience.

I am running a task every 20 minutes that scraps selected messages from public groups, the task executes iter_messages with a wait_time of 10.

I have got a lot of bans using VoIP numbers, all these bans where from the server where I'm hosting the script, the same public IP, and I noticed the last accounts were banned faster.

Now I got a non VoIP phone number and I'm worried if using the same IP to connect to Telegram API would increase the possibilities of being banned based on the previous actions. Do you think being banned a lot of times could create any precedence for banning future connections from the same IP?

I don't believe it will create any precedence because ISPs usually connect a lot of users using the same public IP, so I think a precedence like that would affect millions of users, but I may be wrong.

Any help would be appreciated, regards.

@alexvais
Copy link

alexvais commented Sep 21, 2021

Hi!

I'm experimenting the same error. My accounts are banned when i deploy my web application (that use Telethon library) to Google Cloud Run.

I'm using Quart.

This is my code:

import base64
import os
import json
import hypercorn.asyncio

from quart import jsonify, Quart, render_template_string, request
from telethon import TelegramClient, utils
from telethon.tl.types import InputChannel, InputPeerChannel, InputPhoneContact, InputPeerUser
from telethon.tl.functions.contacts import ImportContactsRequest
from telethon.errors import SessionPasswordNeededError
from telethon.tl.functions.messages import ExportChatInviteRequest, SendMessageRequest
from telethon.tl.functions.channels import CreateChannelRequest, CheckUsernameRequest, UpdateUsernameRequest, SetDiscussionGroupRequest, ToggleSignaturesRequest, InviteToChannelRequest
from requests.models import Response

api_id = XXXX
api_hash = 'XXXX'

#phone_number = '+XXXX'
phone_number = '+XXXX'

client = TelegramClient(phone_number, api_id, api_hash)

app = Quart(__name__)

# Connect the client before we start serving with Quart
@app.before_serving
async def startup():
    print("before start ok!")
    await client.connect()
 
    #if not await client.is_user_authorized():
    #    await client.send_code_request(phone_number)
    #    await client.sign_in(phone_number, input('Enter the code: '))


# After we're done serving (near shutdown), clean up the client
@app.after_serving
async def cleanup():
    print("after serving ok!")
    await client.disconnect()

@app.route('/hello', methods=['POST'])
async def sayHello():
    return "hello"

#... and other methods

Can someone find a solution for this?

Thanks!!

@alega19
Copy link

alega19 commented Apr 29, 2022

@SN3-K Please share your experience related to avoiding getting banned working via Telethon.
Using proxy? How many accounts per one IP?
Create an account with the official mobile app and then moving to python+telethon-app? or create an account with telethon too (if it's possible)?
Wait after creating account? How long?

@babyrig
Copy link

babyrig commented Apr 30, 2022

yay two accounts banned here too :(
Only saw this ticket after my second account been banned and then catch the message and searched:

telethon.errors.rpcerrorlist.UserDeactivatedBanError: The user has been deleted/deactivated (caused by SaveBigFilePartRequest)
Please enter your phone:

Was using the accounts just to upload YT videos to my group nothing else.

@neoromantique
Copy link

Just had an account ban after 6 months of use, the only use of the account was to read few preset telegram channels and forward the messages to discord/sms.

I signed up using Telegram Client and was not using doing anything else/had no other accounts on that ip.

@neoromantique
Copy link

Just had second account banned as well, four hours after its creation.
Both were created using real phone, real sim cards (non virtual) and the only thing that it was doing is read my own channels, so no spam or anything like that.

I don't understand what has changed as it was working fine for a while now

@BloodShine24
Copy link

Just had second account banned as well, four hours after its creation. Both were created using real phone, real sim cards (non virtual) and the only thing that it was doing is read my own channels, so no spam or anything like that.

I don't understand what has changed as it was working fine for a while now

Hi, have you figured out how to not to be banned anymore?

@BloodShine24
Copy link

@SN3-K Please share your experience related to avoiding getting banned working via Telethon. Using proxy? How many accounts per one IP? Create an account with the official mobile app and then moving to python+telethon-app? or create an account with telethon too (if it's possible)? Wait after creating account? How long?

Hi, have you found the solution?

@neoromantique
Copy link

Just had second account banned as well, four hours after its creation. Both were created using real phone, real sim cards (non virtual) and the only thing that it was doing is read my own channels, so no spam or anything like that.
I don't understand what has changed as it was working fine for a while now

Hi, have you figured out how to not to be banned anymore?

I wrote all to all the official emails, got no reply, but accounts have been unbanned a week later (two days ago). 🤷

@dmtea
Copy link

dmtea commented Jun 29, 2022

Just had second account banned as well, four hours after its creation. Both were created using real phone, real sim cards (non virtual) and the only thing that it was doing is read my own channels, so no spam or anything like that.
I don't understand what has changed as it was working fine for a while now

Hi, have you figured out how to not to be banned anymore?

I wrote all to all the official emails, got no reply, but accounts have been unbanned a week later (two days ago). shrug

Hi. And what next after accounts was unbanned? Did you use them with telethon? Is it okey?

@neoromantique
Copy link

Just had second account banned as well, four hours after its creation. Both were created using real phone, real sim cards (non virtual) and the only thing that it was doing is read my own channels, so no spam or anything like that.
I don't understand what has changed as it was working fine for a while now

Hi, have you figured out how to not to be banned anymore?

I wrote all to all the official emails, got no reply, but accounts have been unbanned a week later (two days ago). shrug

Hi. And what next after accounts was unbanned? Did you use them with telethon? Is it okey?

So far so good, nothing happened after.
I do want to stress that I wasn't breaking any ToC in the first place so 🤷

@dmtea
Copy link

dmtea commented Jun 29, 2022

Just had second account banned as well, four hours after its creation. Both were created using real phone, real sim cards (non virtual) and the only thing that it was doing is read my own channels, so no spam or anything like that.
I don't understand what has changed as it was working fine for a while now

Hi, have you figured out how to not to be banned anymore?

I wrote all to all the official emails, got no reply, but accounts have been unbanned a week later (two days ago). shrug

Hi. And what next after accounts was unbanned? Did you use them with telethon? Is it okey?

So far so good, nothing happened after. I do want to stress that I wasn't breaking any ToC in the first place so shrug

And are you using telethon on that accounts after "unban"?

@neoromantique
Copy link

Just had second account banned as well, four hours after its creation. Both were created using real phone, real sim cards (non virtual) and the only thing that it was doing is read my own channels, so no spam or anything like that.
I don't understand what has changed as it was working fine for a while now

Hi, have you figured out how to not to be banned anymore?

I wrote all to all the official emails, got no reply, but accounts have been unbanned a week later (two days ago). shrug

Hi. And what next after accounts was unbanned? Did you use them with telethon? Is it okey?

So far so good, nothing happened after. I do want to stress that I wasn't breaking any ToC in the first place so shrug

And you are using telethon on that accounts after "unban"?

Yeah

@TagePaul
Copy link

If anyone wants to discuss a solution to this problem.
My tg @TagePaul

@SN3-K
Copy link

SN3-K commented Jul 31, 2022

Telegram does specify only 3 accounts can be used per ip/proxy

@SN3-K Please share your experience related to avoiding getting banned working via Telethon. Using proxy? How many accounts per one IP? Create an account with the official mobile app and then moving to python+telethon-app? or create an account with telethon too (if it's possible)? Wait after creating account? How long?

Hi, have you found the solution?

Wow, I am really late to this discussion haha. Well from my previous answer in this thread I did note the time I found supporting evidence that the following was true as of September 2021: Telegram does specify only 3 accounts can be used per ip/proxy

@mmaghi001
Copy link

Interrested if news happend on this subject

@MinutesView
Copy link

MinutesView commented Sep 7, 2022

Just had second account banned as well, four hours after its creation. Both were created using real phone, real sim cards (non virtual) and the only thing that it was doing is read my own channels, so no spam or anything like that.
I don't understand what has changed as it was working fine for a while now

Hi, have you figured out how to not to be banned anymore?

I wrote all to all the official emails, got no reply, but accounts have been unbanned a week later (two days ago). shrug

Hi. And what next after accounts was unbanned? Did you use them with telethon? Is it okey?

So far so good, nothing happened after. I do want to stress that I wasn't breaking any ToC in the first place so 🤷

@neoromantique, can you please share some source code of your project to read telegram channel?

@Skyro04
Copy link

Skyro04 commented Oct 22, 2022

A lot of the times, the telegram bans are related to your actions.

Telegram will not ban from :

Location Proxy

Telegram hates voip numbers, get actual numbers, russia/india avoid for less strict limitations.

Telegram does specify only 3 accounts can be used per ip/proxy, this is very important, I have already tried rotating ip's and using the same proxies only 3 accounts at a time, if the proxy picks up too many bans, the rest will get banned as well.

if you are getting banned what I have noticed 7 seconds is a good number between requests, sometimes more or less.

Most bans you can check the time and it is 1 day, 7 days , or 30 days.

for me what I do is rotate out my proxies and my accounts, once 3 accounts attached to one proxy get banned for 1 days, I will rest them for 3 or 4, and they are "fresh" in telegrams eyes again

Anyone that's wants to compare notes, feel free to dm me... Maybe we should make a community telegram for discussing the limits we find within the Telegram api itself used by the Telethon sdk @Lonami . Imho it might keep the repeated questions off of the issues themselves, a tg they can ask and the community can easily respond to, just a thought. But overall Thanks for the awesome resource, this library is killer.

Why is telegram deleting people's account unnecessary

@Skyro04
Copy link

Skyro04 commented Oct 22, 2022

If anyone wants to discuss a solution to this problem. My tg @TagePaul

Boss why is telegram deleting people's account unnecessary

@Lonami
Copy link
Member

Lonami commented Oct 22, 2022

I'm going to lock this in favor of #824. You can post there if you have more information as to why the account may be banned (if all you intend to post is "me too", simply react with 👍 to that issue instead of leaving a comment and notifying everyone).

@LonamiWebs LonamiWebs locked and limited conversation to collaborators Oct 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests