yagop / node-telegram-bot-api

Telegram Bot API for NodeJS
MIT License
8.17k stars 1.5k forks source link

api calls #807

Closed ManuRakh closed 4 years ago

ManuRakh commented 4 years ago

Question

Hello. I did not find it in the documentation. How can I call the API queries? Like, get messages history of the telegram?

danielperez9430 commented 4 years ago

, get messages history

This repository is only from the Telegram Bot API: https://core.telegram.org/bots/api

You are talking about https://core.telegram.org/ this API is for Telegram clients like Telegram Android / Desktop, ...

If you want to skip the Telegram Bots API restrictions you have to use an MTProto compatible library to skip the Bots / TDLib API. For example Telethon or Pyrogram (Python libarys). Currently in NodeJS there are none that end up working well or that have an active development.

In this link you have the differences between MTProto and the Bot API: https://github.com/LonamiWebs/Telethon/wiki/MTProto-vs-HTTP-Bot-API

Another option would be to make a userbot. You use a Telegram account as a bot, for this you need to use TDLib or Madelineproto (only PHP). For TDLib there are frameworks in NodeJS. The limitations of the userbot would be the same as those you have with your Telegram account.

ManuRakh commented 4 years ago

thanks much :)