Skip to main content

contacts.getContacts

Returns the current user's contact list.

func (c *Client) ContactsGetContacts(ctx context.Context, hash int64) (ContactsContactsClass, error)

Calling this method

client.Run(ctx, func(ctx context.Context) error {
api := client.API()

res, err := api.ContactsGetContacts(ctx, hash)
if err != nil {
return err
}
_ = res // ContactsContactsClass
return nil
})

Parameters

NameTypeRequiredDescription
Hashint64yesHash used for caching, for more info click here.Note that the hash is computed using the usual algorithm, passing to the algorithm first the previously returned contacts contacts.saved_count field, then max 100000 sorted user IDs from the contact list, including the ID of the currently logged in user if it is saved as a contact. Example: tdlib implementation.

Returns

ContactsContactsClass

References