get_recent_locations()

async Client.get_recent_locations()

Get recently shared live locations in a chat.

Usable by Users Bots
Parameters:
  • chat_id (int | str) – Unique identifier (int) or username (str) of the target chat.

  • limit (int, optional) – Maximum number of results. Defaults to 100.

  • hash (int, optional) – Hash for caching.

Returns:

Messages – The messages with recent locations.

Example

locations = await app.get_recent_locations(chat_id)