Before you start
- A Telegram account.
- Alter installed and running on your Mac.
- The Telegram app or Telegram Web.
- @BotFather on Telegram
- Telegram Bots — Features and BotFather
- Telegram Bot API tutorial
- Bot FAQ — groups and privacy
Step 1 — Create a bot with BotFather
Open BotFather
Run /newbot
/newbot. BotFather asks for a display name (shown in contacts) and a username (must end in bot, for example MyAlterHelperBot).

Copy the HTTP API token
123456789:ABCdefGHIjklMNOpqrsTUVwxyz). Copy the full string.Telegram documents this flow in the Bot tutorial — Obtain your bot token.
Optional BotFather settings
Step 2 — Start a chat with your bot
Open the bot
t.me/YourBotName) or search for your bot’s username in Telegram. The success message in Step 1 includes this link.Tap Start
/start so Telegram opens a conversation. You need an active chat before testing Alter.Step 3 — Optional: use the bot in a group
Alter can receive messages from group chats as well as private chats.Add the bot to a group
Check Group Privacy (if messages are missing)
/mybots → your bot → Bot Settings → Group Privacy → Turn off.See Bot FAQ — privacy mode.Restrict access if needed
Secure access — allowlists and IDs
Restrict who can use your Telegram gateway with Allowed Telegram user or chat IDs in Settings → Integrations → Gateways. Alter checks every incoming message and inline-button tap against that list before running an action.@usernames (case-insensitive). Leave the field empty to allow anyone who can message the bot. Enter * to allow everyone explicitly. Messages from users or chats not on the list are silently ignored — Alter does not reply with an error.User ID vs chat ID
Telegram uses numeric IDs for both people and conversations:@username values (for example @sam) if the person has a public username.
How to find your Telegram user ID
Use an ID bot (easiest)
@) into Allowed Telegram user or chat IDs.Forward a message (groups or other chats)
How to find a chat ID
Private chat with your bot
getUpdates method with your bot token and look for "chat": {"id": …} and "from": {"id": …} in the JSON. See Telegram Bot API — Chat and User.Group or supergroup
Bot API getUpdates (no extra bots)
TOKEN with your token):https://api.telegram.org/botTOKEN/getUpdatesSend a test message in the chat you want to identify, refresh the page, and read message.chat.id (chat ID) and message.from.id (sender user ID) from the latest entry.Configure the allowlist in Alter
Collect IDs
@usernames for everyone (or every group) that should be able to use the bot.Paste into Gateways settings
123456789, -1001234567890, @sam).Save and test
Security best practices
- Treat the bot token like a password. Store it only in Alter (Keychain). If it leaks, revoke it in @BotFather with
/revokeand paste the new token into Alter. - Use an allowlist for personal bots. An empty allowlist means anyone who discovers your bot can message it while Alter is running.
- Prefer numeric IDs over
@username. Usernames can change; numeric IDs are stable. - Limit group exposure. Turn Group Privacy on in BotFather unless the bot must read all group messages. Add only trusted groups, and allowlist the group chat ID if the bot is in multiple groups.
- Be cautious with third-party ID bots. They can see forwarded messages and group metadata. Remove them from sensitive groups when you no longer need them.
Connect in Alter
Open Gateways settings
Add a Telegram gateway
Fill in Connection fields
Choose Default action
Enable and save
Test the bot
Confirm Alter is running
Send /help
/help. The bot should list commands.Send a message
Try buttons and /stop
/help and use the New chat, Choose action, or Past chats buttons. While Alter is responding in a group, tap Stop or send /stop to cancel the current turn.Try attachments
Try voice messages
