How to get telegram channel post history?

I need to get all the news from the telegram channel. I’ve read the documentation, and I see that I can only get getUpdates, which doesn’t show all the news, just the latest updates.But the documentation has a messages.getHistory method, but it requires some kind of peer, and no matter what I substitute into it, I always get an error.

I tried to use many libraries, one of them is telegram-mtproto,

const { Telegram } = require('telegram-mtproto');

const telegram = Telegram({
  api_id: "bot number before hash",
  api_hash: 'hash after : symbol',
});

export default async (req, res) => {

  try {

    const channelHistory = await telegram('messages.getHistory', {
      peer: ???,
      limit: 100,
    });

    res.end(JSON.stringify(channelHistory))
  
  } catch(error) {
    console.log(error)
    res.end("error")
  }
}

Maybe someone has already parsed news from the telegram channel, tell me what I’m doing wrong?