contacts.importContacts
Imports contacts: saves a full list on the server, adds already registered contacts to the contact list, returns added contacts and their info. Use contacts.addContact to add Telegram contacts without actually using their phone number.
func (c *Client) ContactsImportContacts(ctx context.Context, contacts []InputPhoneContact) (*ContactsImportedContacts, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.ContactsImportContacts(ctx, contacts)
if err != nil {
return err
}
_ = res // *ContactsImportedContacts
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
Contacts | []InputPhoneContact | yes | List of contacts to import |
Returns
References
- Official documentation
- Generated Go reference
- TL definition:
contacts.importContacts#2c800be5