How to get the group ID and chat ID with telegram inline bot

apibotspython-telegram-bottelegramtelegram-bot

Does any of you guys knows how @like telegram bot works?

When I call it in a group using inline, then select to make a new post, it forwards me to the bot chat, and when I finish, it forwards me back to the group I was. So it must have the group ID somehow.

But accordingly to the API docs, that's not possible.

I tried some tests and all I get is the user ID (as chat ID)

I want to be able to call a inline bot from a group, and then forward it to the bot chat with the user ID and the group ID. It seems that the @like bot does that, but I don't know how.

Can someone help me?

Best Answer

So I find out the solution! There is a special mechanism for returning from where the bot was called:

https://core.telegram.org/bots/api#answerinlinequery the last two parameters https://core.telegram.org/bots/api#inlinekeyboardbutton the last parameter

Related Topic