Before you begin
- ✓NIVA botmaster account with a bot configured
- ✓A Telegram account
Step-by-step setup
- 1
Create a Bot via BotFather
- Open Telegram and search for @BotFather
- Send
/newbot - Enter a display name (e.g. NIVA Assistant)
- Enter a username ending in
bot(e.g. niva_assistant_bot) - Copy the Bot Token BotFather sends back (e.g.
1234567890:ABC...)
- 2
Configure in NIVA Botmaster
- Open your NIVA botmaster → Omnichannel
- Click Configure on the Telegram card
- Paste your Bot Token
- Enter a Webhook Secret Token · any random string (A-Z, a-z, 0-9, _, - only)
- Click Save & Activate
Setting a secret token protects your webhook from fake requests. Use a strong random string. - 3
Verify Webhook Registration
- NIVA automatically calls Telegram's setWebhook API when you save
- Check your server logs for:
[Telegram] Webhook registered: https://... - Optionally verify by visiting:
https://api.telegram.org/bot<TOKEN>/getWebhookInfo - The
urlfield should match your NIVA webhook URL
- 4
Test the Integration
- Open Telegram and search for your bot username
- Click Start or send
/start - Type any message · the bot should reply in 2–3 seconds
- 5
Optional: Configure Bot via BotFather
- Send
/setdescriptionto BotFather to set the bot profile description - Send
/setabouttextfor the about text shown before first message - Send
/setuserpicto set a bot avatar - Send
/setcommandsto define slash commands in the menu
Troubleshooting
Webhook not registered
Server must be publicly reachable via HTTPS. Use ngrok for local dev.
403 in logs
Secret token mismatch · re-save config to re-register webhook.
Bot does not reply in groups
Go to BotFather → /mybots → Bot Settings → Group Privacy → Turn off.
last_error_message in getWebhookInfo
Usually SSL certificate issue · must use a valid HTTPS cert.