Skip to main content

contacts.getContactIDs

Get the telegram IDs of all contacts. Returns an array of Telegram user IDs for all contacts (0 if a contact does not have an associated Telegram account or have hidden their account using privacy settings).

func (c *Client) ContactsGetContactIDs(ctx context.Context, hash int64) ([]int, error)

Calling this method

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

res, err := api.ContactsGetContactIDs(ctx, hash)
if err != nil {
return err
}
_ = res // []int
return nil
})

Parameters

NameTypeRequiredDescription
Hashint64yesHash used for caching, for more info click here

Returns

[]int

References