M
M
Maxim2017-11-12 14:33:20
Python
Maxim, 2017-11-12 14:33:20

What is the limit for adding contacts?

Hello,
I am using telethon to add contacts,

def telegram_contacts(user_numbers):
    l = []
    for num in user_numbers:
        contact = InputPhoneContact(123456789, num, '', '')
        l.append(contact)
    # req_contact = client.invoke(ImportContactsRequest(l, replace=True))
    req_contact = client.invoke(ImportContactsRequest(l))

usr_numbers array of numbers, when it was replace=true, it added a lot more contacts, now the optional replacement attribute has been removed, it
adds 100 contacts ~ and before there were a couple of thousand

Answer the question

In order to leave comments, you need to log in

4 answer(s)
S
Sergey Gornostaev, 2019-08-20
@timurdemsky

Run the code in a country where the RKN does not block the Telegram server, or use a VPN.

H
h0w4rd, 2019-08-20
@h0w4rd

1. If you are from Russia, this may be the result of blocking Telegram RKN. Try VPN or something else to bypass blocking. (In Ukraine, this is how VKontakte blocking works, etc.)
2. Otherwise, this should not happen (I have never had this in Ukraine), your IP may have been blacklisted for some reason. Wait a bit and if it doesn't work, try to write to technical support.
3. Maybe it's something with the library. Try a different one, or a different language altogether. If it works, the problem is in the library.
PS It's better not to show the token, update it just in case;)

L
lightmanLP, 2019-08-20
@lightmanLP

Api telegram does not work in Russia. If you want to bypass the restriction, write a bot with 0 manually. Send requests through requests.get, specifying the proxy there.

B
Bibletoon, 2019-08-20
@bibletoon

As written above, this is all due to telegram blocking. Use a proxy. Tyk

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question