Antes de empezar
- Una cuenta Telegram.
- Alter instalado y ejecutándose en tu Mac.
- La aplicación Telegram o Telegram Web.
- @BotFather en Telegram
- Telegram Bots — Features and BotFather
- Telegram Bot API tutorial
- Bot FAQ — groups and privacy
Paso 1: crea un bot con 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.
Configuración opcional BotFather
Paso 2: inicia un chat con tu 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.Paso 3: Opcional: usar el bot en un grupo
Alter puede recibir mensajes de chats grupales y privados.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
Acceso seguro: listas permitidas e ID
Restrinja quién puede usar su puerta de enlace Telegram con IDs de usuario o chat de Telegram permitidos en Configuración → Integraciones → Gateways. Alter compara cada mensaje entrante y cada pulsación de botón en línea con esa lista antes de ejecutar una acción.@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.ID de usuario versus ID de chat
Telegram utiliza ID numéricos tanto para personas como para conversaciones:@username (por ejemplo @sam) si la persona tiene un nombre de usuario público.
Cómo encontrar su ID de usuario Telegram
Use an ID bot (easiest)
@) into IDs de usuario o chat de Telegram permitidos.Forward a message (groups or other chats)
Cómo encontrar una ID de chat
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.Configurar la lista de permitidos en 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
Mejores prácticas de seguridad
- Treat the bot token like a password. Guárdelo únicamente en Alter (Keychain). Si se filtra, revocarlo en @BotFather con
/revokey pegue el nuevo token en Alter. - Use an allowlist for personal bots. Una lista de permitidos vacía significa que cualquiera que descubra su bot puede enviarle un mensaje mientras Alter se está ejecutando.
- Prefer numeric IDs over
@username. Los nombres de usuario pueden cambiar; Las identificaciones numéricas son estables. - Limit group exposure. Active Group Privacy en BotFather a menos que el bot deba leer todos los mensajes del grupo. Agregue solo grupos confiables y incluya en la lista permitida la ID del chat grupal si el bot está en varios grupos.
- Be cautious with third-party ID bots. Pueden ver los mensajes reenviados y los metadatos del grupo. Elimínelos de grupos sensibles cuando ya no los necesite.
Conéctate en Alter
Open Gateways settings
Add a Telegram gateway
Fill in Connection fields
Choose Acción predeterminada
Enable and save
Prueba el robot
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
