Telegram bot deployment guide - ita-social-projects/WhatBackend GitHub Wiki

Setting up ngrok

  1. Switch to the branch with Telegram bot (currently, it's #566-TG-bot)
  2. Sign up and download ngrok
  3. Execute ngrok.exe
  4. Copy your personal authtoken from the second paragraph of this guide: Connect your account
  5. Run the command ngrok authtoken your_personal_authtoken in ngrok console window

Telegram bot start

  1. Run the command ngrok http https://localhost:44348 -host-header="localhost:44348" -region=eu in ngrok console window
  2. Place .env file in Telegram bot folder, where specify these variables:
ConnectionStrings__DefaultConnection
ConnectionStrings__RabbitMQ
ConnectionStrings__AzureBlobsAccessKey
BotSettings__Url
BotSettings__Key
BotSettings__Name
  1. Copy domain name of forwarding node (domain_name.ngrok.io) and use this value for BotSettings__Url variable
  2. Run the TelegramBotApi