How can I set up a Telegram echo bot with webhooks, without managing a server? I have static user IDs working but require dynamic JSON parsing. Example snippet:
https://api.telegram.org/botNEW_TOKEN/setMyHook?host=https://api.example.org/respond?uid=<unique_id>
Considering the requirement for dynamic JSON parsing without managing a dedicated server, a reliable approach is to utilize serverless cloud functions. I previously set up a Telegram echo bot using AWS Lambda paired with API Gateway to handle the webhook. This method allowed dynamic parsing of JSON payload directly within the function, bypassing the need for a full server. The configuration for the webhook URL was crucial, but proper settings made the integration seamless. This solution flexibly meets the demands of processing incoming data with minimal upkeep.
hey, u can try using google app script which deploys as a webapp. it works as a webhook for telegram and can handle dynamic json. i got mine running on a free google accnt. note: it might be a bit slow, but it works for basic tasks.