title: How can I download the chat history of a group in Telegram?
body: <p>I would like to download the chat history (all messages) that were posted in a public group on Telegram. How can I do this with python?</p>
  
  <p>I've found this method in the API <a href="https://core.telegram.org/method/messages.getHistory" rel="noreferrer">https://core.telegram.org/method/messages.getHistory</a> which I think looks like what I'm trying to do. But how do I actually call it? It seems there's no python examples for the MTproto protocol they use.</p>
  
  <p>I also looked at the Bot API, but it doesn't seem to have a method to download messages.</p>