I joined a private telegram group, I want to get message updates from this group.
I can create a bot but I can't add my bot to this group.
I checked various sources, all tells that bot needs to be in that group to be able to get updates.
Is there a chance that I get my messages from that private group that I joined but my bot not.
I intend to do that using python.
You can't use Telegram Bot API this way.
But you can use User API to get messages.
E.g.: https://docs.pyrogram.org/
Related
I'm using https://github.com/yagop/node-telegram-bot-api and I'm able to send message to user and to my channels. I'd like to improve my bot, I want to manage the private messages that my bot receives.
At the moment when the BOT receive a message, I can save on database from my node application, but if I want to manage all messages, I need to build a backoffice.
Is it possible to read the messages from Telegram and impersonate the BOT and start a normal conversation?
Using Telegram bot, Telegram does not provide any function to retrieve old messages. BOT API does not have such feature.
What you need is to use TDlib - The Telegram client API. It supports both bot and normal Telegram account. And it has many features not available in BOT API.
https://github.com/tdlib/td
There is an example of creating a Userbot on this github page: UserBot
There is also a library for managing a telegram account, which is used to create cross-platform telegram clients: TDLib
I have a telegram group with several human members and a bot. This bot sends regular status updates to the group. I do this with a simple curl command.
https://api.telegram.org/bot<MYBOT-ID>/sendMessage?chat_id=<MYCHAT-ID>=&text=hello%20world
Is there a possibility that the bot sends a message to a specific user in the group, e.g. to inform about a failure. The other members of the group should of course not see or hear this.
You can use "user_id" instead of "chat_id" to send the message to the PV of users instead of sending message in the group
https://api.telegram.org/bot<MYBOT-ID>/sendMessage?chat_id=<USER-ID>=&text=hello%20world
I'm making a slack bot (A) that responses to a message from another slack bot (incoming-webhook) (B).
I'd like to know the user_id of B so that its message will be a trigger for A, where I have some problem getting it.
I tried users.list method (https://slack.com/api/users.list?token=blabla) but the B didn't appear in a result.
Do you have an idea about what method to take to know the user_id of B?
Incoming webhooks appear as apps, not as bot users on Slack. So you won't find a bot user ID in the user list as you would for normal bot users.
Apps have a bot ID, but unfortunately there is no official API method to get the list of bots / apps in a workspace. But if you have control over a workspace and can generate a legacy token you can use the unofficial API method bots.list.
There also is the official bots.info method, if you already have the bot ID and just want to know which app it belongs to.
To create a legacy token for your workspace make sure you are logged in and then go to this page.
I'm creating a telegram bot. I need to keep track when a user is added and who added it.
How can I do it using the telegram APIs?
In groups with the Telegram API, you can call the new_chat_members message and store the user information into an array or DB.
https://core.telegram.org/bots/api
I create a bot with BotFather.
What is the way to disable research bot? I don't want other users start a conversation with my bot.
Simply create a whitelist from Telegram IDs (include your own account Id) and ignore another updates.
Telegram users uniq ID are receive with each update and you can find it in this path:
update.chat.id
I think there is no other way.