Telegram Bot get group chat id and send to group automatically when bot is being added to the group - telegram

I have my existing Telegram bot and want to set my bot to get group chat id and send that id to the group that bot is being added.
Anyone can help me with this?
Thanks beforehand

Related

Not able to get telegram group chat_id param

My goal is to send messages to a specific telegram group using a telegram bot. So, I created a telegram bot and I added itself to the telegram group in order to retrieve the chat_id param. However I am not able to get the chat_id, calling the getUpdates API, I always get:
ok true
result []
Here the steps I did to try to get the chat_id:
I Created a new bot via botFather.
I Created a new telegram group and added the bot.
I used the getMe API to see that everything was good with the bot.
I disabled for privacy the bot (suggested in several forum).
To extract the chat_id, I used the getUpdates method. I did a GET with this URL https://api.telegram.org/botTOKEN/getUpdates (where TOKEN is substitute with what I got from botFather)
I continued with the step 5, while writing random messages on the telegram group and also calling the bot with /start.
There are no coding tasks till now, I have just been using the telegram app.
Not able to get the chat_id; hope you can help me, thanks in advance.

Telegram BOT - How to get chat ID of users in my group?

I've been using a Telegram BOT to send notifications for a group, and for users.
I already know i can get Chat ID by receiving a message from the user on my bot, using getUpdates.
I also know i can get Group ID using the same method...
But what i really need is:
There is three users in my group.
My bot.
Me.
Another user that didn't sent any messages to my bot so it does not appear on getUpdates
Is it possible to get this third user his ID?
PS: I am the group owner, and also added my bot as Admin...
The third user is a normal user.
Can someone help me?
Thanks!
That's not possible with the offical Telegram Bot API
Possible Workarounds:
Hold a list of your own. If a user is joining (new_chat_member), lefting (left_chat_member), somebody is sending a message in the group, and so on. Check Message for more information.
Check if a user is a member of the group with getChatMember.
Also may be helpful: getChatMembersCount and getChatAdministrators

How do I make the bot not leave a telegram group?

I created a new Telegram group, and my problem is that I cannot add any bot to it, knowing that I have created a channel and have linked it to the group and the bot is added to the channel with no problems. Please help me in adding the bot
bot exit messages from My group
I think you are anonymous in group and it looks like the bot you are trying to add doesn't supports anonymous admins.

Telegram API: How to export contact from a group

How to get contacts (user ids) from a particular group? Will telegram API support this functionality?
It's currently not possible to get all contacts of a group with the Telegram Bot API.
The closest you can get is to use getChatAdministrators to receive a list of all administrators in the specified group.

Get telegram user id without chat

I have user's id in telegram. Outside bot. Just ids. Can I somehow get rest information about these users without chat with them?

Resources