In my case the 2 steps worked:
- Added bot to a group as a regular member
- Made Bot an admin.
The second step was needed to let Bot respond and sent messages to Group chat.
The response event.postData.contents
looked like this:
{
"ok":true,
"result":{
"message_id":31,
"from":{
"id":1234567890,
"is_bot":true,
"first_name":"bot for custom alerts",
"username":"mybotname1_bot"
},
"chat":{
"id":-1234567890,
"title":"group name",
"type":"group",
"all_members_are_administrators":true
},
"date":1624860599,
"text":"hi"
}
}
I needed to receive the chat id (negative number from response) to send messages to the group by Bot.