5

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?

Pablo
  • 510
  • 8
  • 22

1 Answers1

2

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

Pablo
  • 510
  • 8
  • 22
  • 2
    can you clarify on how to get the group ID? It's not clear from the docs – Alexander Trakhimenok Sep 21 '17 at 11:28
  • 1
    Got it, missed this part: Especially useful when combined with switch_pm… actions – in this case the user will be automatically returned to the chat they switched from, skipping the chat selection screen. – Alexander Trakhimenok Sep 21 '17 at 11:33
  • Ok @Pablo, you solved your problem but the answer doesn't match actually the question. You can switch from group to bot and back, but it seems there is no way to get the group ID from inline mode. – Jacopo Pace Mar 28 '22 at 18:53