title: Telegram API: How do I get messages from a public channel, which I am not participant of?
body: <p>I am able to successfully retrieve messages from a channel via <a href="https://github.com/telegramdesktop/tdesktop/blob/dev/Telegram/Resources/scheme.tl#L1116" rel="noreferrer">channels.getMessages</a> request, once I know their <code>message IDs</code>. I find channel id by <a href="https://github.com/telegramdesktop/tdesktop/blob/dev/Telegram/Resources/scheme.tl#L987" rel="noreferrer">contacts.search</a>, by the way.</p>
  
  <p>At the moment, mesage IDs are consequtive integers, so getting max_id would solve the issue.</p>
  
  <p>I am sure it possible, since official clients do this (view a channel without joining it). I will try to find out how official desktop app does this by reading <a href="https://github.com/telegramdesktop/tdesktop" rel="noreferrer">its sources</a>, but any help will be much appreciated.</p>
  
  <p>I need this because am writing a simple public telegram channel -> rss/web interface.</p>
  
  <p>Please do not confuse Telegram Client API with Telegram Bot API. Bot API allows to receive 'push' messages on new messages, but no 'reading historical logs'.</p>