title: Telegram get message by channel ID
body: <p>I am subscribed to a private telegram Channel/chat where I am not admin and the username is not public.</p>
  <p>I can get the channel id from the url in the form <a href="https://web.telegram.org/#/im?p=c1234567890_12345678901234567890" rel="nofollow noreferrer">https://web.telegram.org/#/im?p=c1234567890_12345678901234567890</a>
  And can read all the messages in my telegram and via my web browser.</p>
  <p>The channel outputs data (messages) that I want to grab and format and ultimately automatically append to a csv file or such like via a bot or an app on my mac.</p>
  <p>Is it possible to do this?</p>
  <p>I am currently trying to do this in Python using the Telethon package.</p>
  <p>I have been trying to access or  address the channel by ID but get errors like
  No user has &quot;c1234567890&quot; as username
  Or
  No user has &quot;-1001234567890&quot; as username</p>
  <p>I am trying to use the telethon client.getmessages() method but looks like it will only accept a username and not a chat or channel ID.</p>
  <p>Any help/guidance or pointing in the right direction appreciated - I think my main issue is resolving the channel ID to a username or finding classes/methods where I can get the messages by channel ID.</p>