Try it out: @supabase_example_bot
- Create the function:
supabase functions deploy --no-verify-jwt telegram-bot
- Contact @BotFather to create a bot and get its token.
- Set the secrets:
supabase secrets set BOT_TOKEN=your_token FUNCTION_SECRET=random_secret
- Set your bot’s webhook URL to
https://<PROJECT_NAME>.functions.supabase.co/telegram-bot
(replacing<...>
with respective values). To do that, you open the request URL in your browser:
https://api.telegram.org/bot<BOT_TOKEN>/setWebhook?url=https://<PROJECT_NAME>.functions.supabase.co/telegram-bot?secret=<FUNCTION_SECRET>