How can I make requests in response to updates?

How can I make requests in response to updates?

Telegram Bot Support

This is possible if you‘re using webhooks. The upside is that you need less requests, the downside — that in this case it’s not possible to know that such a request was successful or get its result.

Whenever you receive a webhook update, you have two options:

1. Issue POST to https://api.telegram.org/bot<token>/method

Answer using POST request

2. Reply directly and give method as JSON payload in the reply

Answer using response payload
You may also want to look at our sample HelloBot, it offers a PHP implementation of this.




Report Page