title: How to obtain the chat_id of a private Telegram channel
body: <p>I use curl to update my public channels. This kind of syntax:</p>
  <pre><code>curl -X POST &quot;https://api.telegram.org/bot144377327:AAGqdElkZ-77zsPRoAXXXXXXXXXX/sendMessage&quot; -d &quot;chat_id=@MyChannel&amp;text=my sample text&quot;
  </code></pre>
  <p>But what's the <code>chat_id</code> of a private channel? It's not the one you have in the private invite.</p>
  <p>Because now we can pass a channel username (in the format @channelusername) in the place of chat_id in all methods (and instead of from_chat_id in forwardMessage). But what's the  @channelusername of a private channel that I administer?</p>