Telegram
Nakama can run as a Telegram bot so you can chat with the same agent from your phone, desktop Telegram, or a shared group.
The mental model is simple:
- Telegram is a channel for Nakama
- The bridge talks to the same Nakama server as the web app
- Pairing links a real Telegram user to your Nakama access
What Telegram supports
With Telegram enabled, users can:
- chat with a Nakama profile in a private chat
- use the bot in Telegram groups
- receive outbound webhook notifications in a group or topic
- switch org and profile with commands
- send text, photos, voice notes, and supported documents
- receive Markdown-style rich replies when Telegram accepts the formatting
Step 1: Create a bot with BotFather
Every Telegram setup starts with a bot token from @BotFather.
- Open Telegram and search for
@BotFather - Send
/newbot - Choose a display name
- Choose a username that ends with
bot - Copy the bot token
Keep the token secret. Anyone with the token can control your Telegram bot.
Step 2: Save Telegram settings in Nakama
Open Integrations → Telegram in the Nakama web app, then:
- Paste the bot token
- Choose the default Nakama profile for Telegram replies
- Save

When you save for the first time, Nakama can generate a pairing code for linking your Telegram account.
Step 3: Enable audio transcription for voice chat
Telegram voice notes and audio files are turned into text before they are sent to the agent.
To enable that:
- Open Settings in the Nakama web app
- Add an OpenAI provider in LLM providers if you have not added one yet
- In Audio transcription model, choose an OpenAI model such as Whisper
- Wait for the
Savedconfirmation
If no OpenAI provider is connected, the audio transcription setting stays unavailable. Without this setting, text chat still works, but Telegram audio messages will not be transcribed for the agent.

Step 4: Pair your Telegram account
Pairing is required so random Telegram users cannot talk to your internal Nakama bot.
- Copy the pairing code from Integrations → Telegram
- Start a private chat with your bot
- Send the pairing code as a normal text message
After a successful match, that Telegram user is linked and the pairing code is cleared.

Why pairing exists
The bot token only connects Nakama to Telegram.
Pairing connects your Telegram user account to Nakama permissions.
That means Nakama can:
- identify which Telegram user is talking
- allow private chat safely
- apply the right org and profile access
Step 5: Start the Telegram bridge
For local development, start it from the repo root:
bun run dev:telegramThe bridge uses long polling and forwards Telegram messages to your Nakama server.
If the Nakama server is not already running, the bridge will try to start it.
For production, start the Telegram bridge worker from the Integrations page in the Nakama web app instead of using the dev command.
Optional: Direct allowlist instead of pairing
Nakama also supports allowlisting Telegram user IDs directly.
This is useful when you want to pre-authorize specific users without the one-time pairing flow.
To add users from the dashboard:
- Open Integrations → Telegram
- In Allowed users, click Manage
- Paste a numeric Telegram user ID and click Add
To paste raw Telegram update JSON instead:
- Open Integrations → Telegram
- In Allowed users, click Manage
- Click Import JSON
- Paste the raw Telegram update JSON
- Click Add user
Use the Telegram user's from.id, not their @username.
When you paste raw JSON, Nakama reads message.from.id and shows the username when it is present.
For example, in this Telegram update payload:
{
"from": {
"id": 213193924,
"username": "ahmadrosid"
}
}The allowed user ID is:
213193924You can also configure allowed users through TELEGRAM_ALLOWED_USER_IDS for environment-based deployments.
Step 6: Configure Telegram privacy mode for groups
Telegram bots start with Group Privacy enabled. This is the most common reason a bot seems fine in private chat but not in groups.
If you want mention-based group usage to work reliably:
- Open
@BotFather - Open your bot settings
- Disable Group Privacy
- Remove the bot from the Telegram group
- Add it back again
That re-add step matters because Telegram may keep the old delivery behavior for bots already in the group.
Configuration notes
Nakama stores Telegram bridge settings under its local config directory.
Important values include:
- bot token
- default Telegram profile
- pairing code
- paired user IDs
- allowed user IDs from the dashboard allowlist
Environment-based setup is also supported. The main env var is:
TELEGRAM_BOT_TOKENNakama also supports:
TELEGRAM_ALLOWED_USER_IDS
NAKAMA_TELEGRAM_PROFILE_IDNext steps
- Chat behavior & commands — how the bot behaves in private chats and groups
- Outbound notifications — send webhook notifications into Telegram
- Troubleshooting — debug the bridge worker and common issues
- Quickstart
- Discord