Skip to main content

Setup Telegram Bot

Integrate your Telegram Bot with Fiko to receive and reply to Telegram messages directly from your unified communication dashboard.

Overview

Fiko integrates directly with Telegram using the official Telegram Bot API. This allows your team to manage Telegram customer conversations alongside WhatsApp, LINE, and other channels in one place.

What you'll achieve

  • Create and connect a Telegram Bot to Fiko
  • Securely link Telegram Bot Token to Fiko's backend
  • Automatically register Fiko's webhook endpoint
  • Start receiving and replying to Telegram messages in real-time

About Telegram Bots

Telegram bots are lightweight applications that run inside the Telegram ecosystem. They can handle messages, commands, and rich interactions through a simple HTTPS API. Fiko leverages this API to synchronize messages, users, and sessions between your Telegram bot and the Fiko dashboard.

Setup Process

The Telegram integration setup involves creating a bot using BotFather, retrieving the bot credentials (token and username), and connecting it through Fiko's setup wizard. The wizard walks you through three steps — Connection Type, Configuration, and Complete Setup. A fourth step (manual Webhook Setup) appears only if the automatic webhook registration fails after the configuration step.

1

Create a Telegram Bot

Telegram bots are created through @BotFather, an official Telegram bot that manages all other bots.

  • Open Telegram and search for @BotFather
  • Start a chat and click "Start"
  • Send the command /newbot
  • Enter your bot's display name (e.g. "MyBrand Support Bot")
  • Enter a unique username ending with _bot

BotFather will return a message containing your bot's API token. Keep it safe — this token allows authorized access to your bot.

2

Get Your Bot Credentials

After creating the bot, BotFather provides you with two important credentials.

Bot Token:

123456789:ABCdefGHIjklMNOpqrSTUvwxYZ123456789

Bot Username:

@your_bot_username
  • Bot Token: Authenticates your bot with Telegram's API
  • Bot Username: Your bot's unique identifier (shown to users)

Security Note: Treat your bot token like a password. Do not share it publicly or commit it to Git. Fiko encrypts and securely stores it.

3

Connection Type

The first screen of the Fiko Telegram setup wizard asks how you want to connect.

  • Go to Settings → Channels in your Fiko dashboard
  • Click Add new channel and choose Telegram
  • Choose whether to create a new bot or connect an existing bot

The Direct Telegram provider is selected automatically — you do not need to choose a provider implementation manually.

4

Configure Bot Credentials

Fiko will dynamically generate a configuration form based on your selected provider. For Telegram, you'll need to provide:

TELEGRAM_BOT_TOKEN (Required)

Your bot's API token from BotFather

BOT_USERNAME (Required)

Your bot's username (e.g., @your_bot_username)

Click "Complete & Continue" to validate your credentials. Fiko verifies your bot token with Telegram's API using the getMe method, then automatically attempts webhook registration. If registration succeeds, you proceed directly to the Complete Setup screen.

5

Webhook Setup (error path only)

After you submit your bot credentials, Fiko automatically attempts to register the webhook with Telegram. If that succeeds, the wizard skips directly to the Complete Setup screen and this step does not appear.

The manual Webhook Setup screen appears only if automatic registration fails. In that case, Fiko provides a curl command you can run yourself:

curl -X POST https://api.telegram.org/bot<TOKEN>/setWebhook \
  -d '{"url": "<FIKO_WEBHOOK_URL>"}'

Telegram responds with { "ok": true } when your webhook is successfully registered. Fiko displays a success message automatically.

6

Complete Integration

Once your configuration is tested and webhook is registered, you'll see a completion summary. Click "Connect Telegram Bot" to finalize.

  • Configuration validation status
  • Webhook registration confirmation

Success! Your Telegram bot is now connected to Fiko. You can send and receive Telegram messages directly in the unified chat dashboard.

Technical Implementation

  • POST /webhooks/telegram — Fiko's endpoint for incoming updates
  • sendMessage — Used to send replies via Telegram Bot API
  • getMe — Used to verify bot identity and token validity
  • Fiko automatically verifies each Telegram payload using update_id and bot_id

Troubleshooting

Webhook not responding?

Run /getWebhookInfo via Telegram API to verify configuration.

Messages not appearing in Fiko?

Ensure the webhook endpoint is publicly reachable via HTTPS (no firewall blocking).

Invalid token error?

Regenerate your token in BotFather with /revoke and /token.

Ready to connect?

Head to your Fiko dashboard to start the Telegram Bot integration.

Back to Channels
Setup Telegram Bot — Telegram Integration