Answer the question
In order to leave comments, you need to log in
How can I implement a response to a user on a message forwarded from a bot to a group chat?
Hello!
On one of the telegram bots, I saw the following functionality: the user writes a message to the bot, this message is redirected to the group chat where the admins are sitting, the admin can answer the user in this chat, and the user receives this answer directly in the chat with the bot.
Do I need to create two webhooks for this (one for the bot, the other for the group chat) or is there some standard interface that allows you to forward these messages back to the chat with the bot?
Thank you.
Answer the question
In order to leave comments, you need to log in
The problem was solved quite simply.
When someone writes a response to a message forwarded from a bot to a certain group chat in which the bot is included, a normal call to the bot's webhook is generated, where, among other things, information is transmitted about which user the message was redirected from:
[forward_from] => Array
(
[id] => XXXXXXXXX
[is_bot] =>
[first_name] => YYYYYY
[last_name] => ZZZZZZ
[username] => JJJJJJ
[language_code] => ru
)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question