Docs / Integrations / Telegram
Connect Telegram
Connect your Sutando to Telegram so you can DM it from your phone, watch, or anywhere Telegram works. No developer portal: one conversation with BotFather, one token in S.space, and one code to prove the first DM is yours.
Before you start
- A Telegram account. Get the app from your phone's app store or telegram.org/apps.
- The S.space desktop app, signed in (download it). Bot tokens are set there, where the engine runs.
Start a chat with BotFather
In Telegram, search for BotFather, Telegram's official bot for creating bots (@BotFather, the one with the verified checkmark). Tap Start, then send /newbot.
Pick a name and a username
BotFather asks for a display name (anything) and a username, which must be unique and end in bot. If a username is taken, try another.
BotFather then replies with a token like 123456789:ABCdefGHIjklMNOpqrSTUvwxYZ.
Paste the token into S.space
Copy the token from BotFather's reply.
In the desktop app, click your name, pick Agent, and choose Connections under Agents. Under Bridge Channels, paste the token into TELEGRAM_BOT_TOKEN on the Telegram card and click Save. The pill changes to TELEGRAM_BOT_TOKEN · set and a green dot appears. Then restart.
Send the enrollment code
In Telegram, search for your bot by its username, open the chat, tap Start and say hello.
The first reply is Enrollment code required. Check the bridge startup log for your code and send it here. When the bridge starts with no owner enrolled yet, it prints a six-character code, so nobody else can claim a new bot by DMing it first. Your Sutando can read it for you.
Ask for the enrollment code
My Telegram bot asked for an enrollment code. Read the latest one from the Telegram bridge log and give it to me.Send the code in the Telegram chat. You are now the bot's owner, and your Sutando answers there with the same memory as everywhere else.
A new code is made each time the bridge starts while no owner is enrolled, so use the newest one.
How Sutando knows it's you
The DM with the code enrolls your Telegram user ID as the owner. Messages from anyone else are dropped. To let another person DM your bot, ask your Sutando to add their numeric Telegram user ID; there is no Settings field for it.
Troubleshooting
"Username is invalid" or "already taken"
Bot usernames must end in bot and be unique. Pick something more specific; BotFather lets you retry.
The bot doesn't reply
Can I add the bot to a group?
Yes, but with BotFather's default privacy mode a plain @mention isn't delivered. Make the bot a group admin, or turn privacy mode off in BotFather.
I lost the token
In BotFather, send /mybots, pick your bot, and open API Token. To rotate it, revoke the old one there and paste the new one.
Stuck?
See Get support.