There is no way to filter updates specifically by chat id (API does not permit that), if not onto your own code, however, you could still filter updates by their type.
Here's an example on how to filter callback queries and messages only:
api.telegram.org/bot{token}/getUpdates?allowed_updates=["callback_query","message"]
Note: as written on BotApi Documentation, even if you pass allowed_updates
parameter on getUpdates
, only new received updates will be filtered following filters:
Please note that this parameter doesn't affect updates created before
the call to the getUpdates, so unwanted updates may be received for a
short period of time.
All possible update types are listed here: core.telegram.org/bots/api#update