get_contact_ids()

async Client.get_contact_ids()

Get the Telegram user IDs of all contacts.

Usable by Users Bots
Parameters:

hash (int, optional) – Hash used for caching. Defaults to 0.

Returns:

List of int – List of contact user IDs.

Example

ids = await app.get_contact_ids()