Can a Telegram bot read his own messages on a channel - telegram

I'm trying to figure out why my bot is not aware of his own messages on a channel, when I use bot.get_updates() I receive only messages written by me and not by the bot.

According to the python-telegram-bot API description, getUpdates fetches the messages sent to your bot, not the messages your bot sent. So it is intended behaviour that getUpdates would not be aware of the messages sent by your bot.
As a sidenote, as stated in the Telegram Bots FAQ, Telegram bots cannot access messages sent by other bots, regardless of the settings.

Related

Is it possible to send messages to Telegram's "Saved Messages" through the API?

Is it possible to send a message via Telegram API to the Saved Messages chat?
I have been looking all over the internet but could not find any information. I would think this would be possible.
If you mean the main mtproto api, yes you can send yourself a message by your id or username and telegram will place it in saved messages.
You did not mention which API you use, but this is how you do it in Telethon:
client.send_message("me", "hello")
But if you mean bot api, it's not possible for bots to send messages to your saved message.

Telegram bot livecheck or how to get bot's chat id

Can I use telegram api for the bot live-check automation? There are dozens of bots created by a third-party service so I cannot modify their source code, but I've their names and tokens.
I thought I can create a bot who will send messages to others bots, but I can't find any info of how to obtain bot chat id.
So the question is how to obtain bot chat id to write a message to him from another bot. Or how to health check telegram bots.
Telegram bots do not receive updates from other bots, otherwise this could lead to infinite looping.
Why doesn't my bot see messages from other bots

What is the web request to send a message to my telegram bot?

I tried this:
https://api.telegram.org/botXXtokenxx/sendMessage?chat_id=chat_id&text=text
But this is to send a message from the bot.
But what I need to do to send to the bot? (not from the bot)
You can either use a regular Telegram client (Telegram, Telegram X, Telegram Desktop, etc) to do it manually, or if you need an API (for whatever reason)...
You need the client API.
https://core.telegram.org/#getting-started
Once you have an API key for the client API and all that, you can send messages as explained here.
https://core.telegram.org/method/messages.sendMessage
Note that a human should be triggering this, as Telegram encourages (may be against ToS?) using a bot API for programatic access rather than the client API.

Telegram api send frequently message to our api

I have a problem with telegram bot api.
when i was set webhook,then one of client send a photo to our bot and telegram api send frequently obejct of this photo to our api with the same update_id
this is answer from telegram support:
most probably issue is that you are not answering with a "2XX" to our requests, so we are sending the same updete as we understand that it wasn't received.
whats problem?!
The problem is you are not returning the proper status code (200) to Telegram so it thinks you did not receive the message successfully.

How to get telegram bot chat_id?

Do telegram bot can send a message to himself?
Need to my bot on start send a message to himself.
Is there such a possibility?
No, bots can't send message to each other or to them self.

Resources