add_contacts()

Client.add_contacts()

Add contacts to your Telegram address book.

Parameters

contacts (List of InputPhoneContact) – The contact list to be added

Returns

types.contacts.ImportedContacts

Example

from pyrogram import InputPhoneContact

app.add_contacts([
    InputPhoneContact("39123456789", "Foo"),
    InputPhoneContact("38987654321", "Bar"),
    InputPhoneContact("01234567891", "Baz")])