Contact Us
Telegram Integration

How to Connect Telegram to NIVA — Complete Integration Guide

5–10 minutes Easy 5 steps

Connect NIVA to Telegram so your AI bot responds to messages in private chats, groups, and channels. NIVA automatically registers the Telegram webhook when you save the configuration — no manual API calls needed.

Before you begin
NIVA botmaster account with a bot configured
A Telegram account
Step-by-step setup

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...)

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.

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 url field should match your NIVA webhook URL

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

Optional: Configure Bot via BotFather

  • Send /setdescription to BotFather to set the bot profile description
  • Send /setabouttext for the about text shown before first message
  • Send /setuserpic to set a bot avatar
  • Send /setcommands to 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.
Ready to connect Telegram?
Open your NIVA botmaster → Omnichannel → Configure
Open Omnichannel