Reputation:
I have three Telegram bots with the same hook address (or even with three hook addresses). I get input like this:
$content = file_get_contents("php://input");
$update = json_decode($content, true);
How can I recognize which input is sent for which bot?
Upvotes: 1
Views: 633
Reputation: 8015
You can set webhook URL with bot name as the query string.
For instance, use https://t.me/hook.php?bot=Sean
, and you can use $_GET['bot']
for each bot.
Upvotes: 4