Telegram
Prefer guided AI setup?
Instead of following these steps manually, you can use the AI Credential Assistant — describe what you want to connect and the AI will walk you through the setup step by step, tailored to your account.
Overview
Connect your Telegram bot to Nirvai to send messages, manage groups, and automate interactions through the Telegram Bot API.
Supported Authentication Methods
- Bot Token - Token provided by BotFather
Prerequisites
- A Telegram account
- Access to Telegram (mobile app or desktop)
Setup Instructions
Creating a Telegram Bot
- Open Telegram and search for @BotFather
- Start a chat with BotFather
- Send the
/newbotcommand - Follow the prompts:
- Enter a display name for your bot (e.g., "My Nirvai Bot")
- Enter a username for your bot (must end in
bot, e.g., "mynirvai_bot")
- BotFather will respond with your bot token in this format:
123456789:ABCdefGhIJKlmnoPQRstUVwxYZ
- Copy this token
- In Nirvai, create a new Telegram credential and paste the token
Getting an Existing Bot Token
If you already have a bot:
- Open a chat with @BotFather
- Send
/mybots - Select your bot
- Click API Token to view/regenerate the token
Bot Configuration (Optional)
After creating your bot, you can configure it via BotFather:
| Command | Description |
|---|---|
/setdescription | Set the bot's description |
/setabouttext | Set the bot's About info |
/setuserpic | Set the bot's profile picture |
/setcommands | Define bot commands |
/setprivacy | Toggle group privacy mode |
Troubleshooting
Common Issues
- 401 Unauthorized: Token is invalid or was revoked. Get a new token from BotFather.
- Bot not responding: Ensure the bot is not blocked by the user.
- Can't send to group: Bot needs to be added to the group first.
- Privacy mode: By default, bots only see messages that start with
/in groups. Disable privacy mode via BotFather if needed.
Token Security
- Never share your bot token publicly
- If compromised, use
/revokein BotFather to generate a new token - The old token will immediately stop working
Related Resources
Adapted for Nirvai platform
Next Steps
Got your credential? Connect it to an agent
Use the AI Tool Creator to turn this credential into agent-callable tools. Describe what your agent should be able to do and the AI investigates the API, configures the endpoints, and gives you a reviewable toolkit before saving anything.