I've been using telegram_bot, and trying to get groupChat id to send notifications to group chat, but don't know which methods I have to use for it.
For getting chat id I use to message.chat.id when the bot participated in the chat but which I have to use for getting group chat id can't find/
Type “ @RawDataBot ” and select “Telegram Bot Raw” from the drop-down list. Click on the “Start” button in the auto-reply message. The Telegram bot will send a message with your account info. Scroll down and find “Chat.” Your chat ID number is listed below, next to “id.
Note the number next to "ID." The number next "ID" below "Chat" in Telegram Bot Raw's message is the chat ID for the entire group.
In your telegram, create a new chat group and add the bot that you have created into the chat group. 2. To get the chat ID of the group chat, use your internet browser and search for “Telegram Web”. Login to your account on Telegram Web by scanning the QR code. 3.
How to get a Chat ID of a Telegram Group. Use the tool above to get the Chat ID of the group that your Bot is a member of. Create a Bot using the official telegram BotFather (it has a verified symbol next to it when you add it as a contact), Follow the prompts, and finally copy it’s HTTP API Token, Select the Bot User from the Group members list,
To get the chat ID of the group chat, use your internet browser and search for “Telegram Web”. Login to your account on Telegram Web by scanning the QR code. 3. Select the group chat that you have added your Telegram bot into, you will find the chat ID of the group chat shown in the URL within the address bar.
Once you’ve added your Telegram chatbot to your Telegram group, and you mention it, you will probably see that the chatbot doesn’t automatically respond: This is because the chatbot is not an admin of the group. So, you need to click on the top bar of your Telegram group:
In order to get the group chat id, do as follows:
Add the Telegram BOT to the group.
Get the list of updates for your BOT:
https://api.telegram.org/bot<YourBOTToken>/getUpdates
Ex:
https://api.telegram.org/bot123456789:jbd78sadvbdy63d37gda37bd8/getUpdates
Look for the "chat" object:
{"update_id":8393,"message":{"message_id":3,"from":{"id":7474,"first_name":"AAA"},"chat":{"id":<group_ID>,"title":""},"date":25497,"new_chat_participant":{"id":71,"first_name":"NAME","username":"YOUR_BOT_NAME"}}}
This is a sample of the response when you add your BOT into a group.
Use the "id" of the "chat" object to send your messages.
(If you created the new group with the bot and you only get {"ok":true,"result":[]}
, remove and add the bot again to the group)
Private chart only works in image argoprojlabs/argocd-notifications:v1.1.0
or above.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With