Pablo
Pablo

Reputation: 530

How do I get the group ID and chat ID with telegram inline 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?

Upvotes: 5

Views: 7387

Answers (1)

Pablo
Pablo

Reputation: 530

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

Upvotes: 2

Related Questions