1

I have been trying to use telethon to:

  1. Scrape and gather the members and their ID from my group.
  2. Add those members as contacts in telegram. (adding contacts without the phone number)

So far, I have been able to create the CSV file of the members of my group with telethon, but I am currently stuck at how to add these accounts as contacts in telegram.

Does anybody have a solution or code for this?

Yogi
  • 11
  • 2
  • [Telegram API](https://core.telegram.org/method/contacts.addContact)? – fynsta May 31 '21 at 11:25
  • Does this answer your question? [add contact with telethon in python](https://stackoverflow.com/questions/53436883/add-contact-with-telethon-in-python) – Zahir J May 31 '21 at 16:58
  • This should be up . im also stuck in this code https://stackoverflow.com/questions/68188603/im-making-a-code-that-adds-multiple-contact-in-my-telegram-by-username-listed-in – Hell Crank Jun 30 '21 at 09:26

1 Answers1

0

This issue seems similar to what I encountered using tdl.
As detailed in this TDLib issue, after restarting the telegram client, you first have to call getUser on a contact for TDLib to load it from the database so you can work with that contact.

luroc
  • 73
  • 1
  • 8