I am creating an application in Node Js that needs to read a message from a Telegram channel, does anyone know how to do it?
I found a lot of information about creating a Telegram Bot, but that does not help. To read information from a public Telegram channel, no bot should be needed.
Thanks and best regards.
You can use telegram mtproto api.
some good efrence is here :
https://openbase.io/js/#mtproto/core/documentation
https://core.telegram.org/methods
Related
I need to add users using a telegram bot, I know that the standard bot API will not be able to do this, what other options can there be?
I read that you can do this through the client, maybe someone has examples of this?
I already develope the code for it
You can access it from the link
(developed with telethon library)
I am currently writing a bot to take screenshots of Telegram chat in Python.
I have written the options the bot is supposed to give to the user when it's started but I have no idea how to do this.
is it possible at all?
does telegram even let us do such a thing?
Based on official Documents of Telegram :
Bots are no different from human users that you meet in groups for example. They can see your public name, username, and profile pictures, and they can see messages you send to them, that's it.
and you can find more information from bots-privacy-mode
so basically Telegram doesn't let BOTs do such things as taking screenshots.
Just wondering if it's possible to send a user a dm with a bot when a channel is deleted.
Yes, it is, using client events. This question is quite vague and non-code specific so you should head to the Discord.JS discord server for questions like this (avail. on their website).
Is it possible to send a message from a node.js server to someone's mobile number or telegram Id directly?
is it possible without using a telegram bot?
I need an API like below:
function sendMessage(senderTelegramId, receiverTelegramId, messageText)
In short: No, without a bot no way for now.
Detailed explanation:
In order for you to send users messages on telegram you would need to create your own telegram bot. They have a well documented API which you can read and play around with.
There are 2 things you should know about sending messages to users using telegram bot:
You can't just send random people messages on telegram even if you know their phone number, to send them messages you need to have their chat_id. See how in the docs
To get the chat_id the user must first click the start button that comes up when they open your bot for the first time. Telegram will send you the chat id of that user and you save it for later when you would want to send messages to that user.
There are tons of libraries that makes working telegram bots very easy, it wouldn't take you more than an hour to get started.
I hope this answers the question, feel free to ask further questions, I have made some bots and you can also play around with them to see how it works.
Cheers )
There is actually one more easiest way to send a message to chat
just fetch the URL
https://api.telegram.org/bot[BOT_API_KEY]/sendMessage?chat_id=[MY_CHANNEL_NAME]&text=[MY_MESSAGE_TEXT]
you can find more details here
https://xabaras.medium.com/sending-a-message-to-a-telegram-channel-the-easy-way-eb0a0b32968
i have been strugling with this for the past few days, i keep getting errors like MIGRATE_PHONE and bad request and the documentation for these errors are really scarce. is there a way i can use the telegram api with node js to send a message to someone without using a telegram bot?
Thanks