6

My goal is to add 10M contacts to telegram.

How can we add contacts to telegram using telegram API? I have tried using telethon in which I batched 500 contacts in one request. However, telegram responded all such requests with all contacts in retry_contacts and none were imported.

I have also found out a solution to convert the txt file of 10M contacts to csv file and import them using an android app. But this takes approx 10 mins for 10k contacts. So this won't be a good idea for adding 10M contacts.

Any other method for having this done is also welcomed.

Shreeya Patel
  • 125
  • 1
  • 1
  • 11
  • I'd consider contacting their support team if you want to add 10M contacts in one shot; they may be able to offer an alternative method (assuming they don't want that many contacts hitting their API). – snakecharmerb Dec 11 '18 at 18:58

1 Answers1

10

This is not possible. Telegram has deliberately set limits on the number of contacts you can add. Initially you can add about 5000 contacts and after that you can add about 100 more every day. This is because of security not decreasing their API load. If you could add 10M numbers, you could easily map @usernames to numbers which is against Telegram privacy policy.

In my experience, the best practical option is to add an array of 10 numbers each time using telethon's ImportContactsRequest, until you get locked. Then try 24 hours later again until you get locked again, and so on. This is the fastest solution and due to Telegram restrictions, if you only have 1 SIM card, it takes around 274 years to add 10M contacts.

Ali Hashemi
  • 3,158
  • 3
  • 34
  • 48
  • 2
    Hey, where did you get these numbers 5000 and 100 from? – Shreeya Patel Dec 12 '18 at 07:13
  • With 1 sim, if you add 1 contact at a time, with 1 sec delay, telegram will block you at 490th attempt for 242 sec. And speed will be 3600 numbers per 6 hours. And telegram never bans you. I can't imagine what will happen if we use multiple sims, with importing multiple contacts at a time. – Gray Programmerz Dec 10 '21 at 11:48
  • Were did you get this 5000 cotacts number from? There is nothing about this in Telegrams docs, and my account was limited after adding about 50 contacts. – Mr.D Jul 14 '23 at 04:34