import_contacts()#

Client.import_contacts()#

Import contacts to your Telegram address book.

Usable by Users Bots
Parameters:

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

Returns:

types.contacts.ImportedContacts

Example

from pyrogram.types import InputPhoneContact

await app.import_contacts([
    InputPhoneContact("+1-123-456-7890", "Foo"),
    InputPhoneContact("+1-456-789-0123", "Bar"),
    InputPhoneContact("+1-789-012-3456", "Baz")])