get_users()

Client.get_users()

Get information about a user. You can retrieve up to 200 users at once.

Parameters

user_ids (iterable) – A list of User identifiers (id or username) or a single user id/username. For a contact that exists in your Telegram address book you can use his phone number (str). Iterators and Generators are also accepted.

Returns

User | List of User – In case user_ids was an integer or string the single requested user is returned, otherwise, in case user_ids was an iterable a list of users is returned, even if the iterable contained one item only.

Example

# Get information about one user
app.get_users("haskell")

# Get information about multiple users at once
app.get_users([user1, user2, user3])