1
votes

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?

1

1 Answers

3
votes

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.