Prerequisites
- A Telegram account
- A bot token from @BotFather
- Your numeric Telegram user ID (use @userinfobot to find it)
Setup
Create a bot with @BotFather
Open Telegram, start a conversation with @BotFather, and send
/newbot. Follow the prompts to choose a name and username. BotFather will reply with your bot token — copy it.Find your Telegram user ID
Start a conversation with @userinfobot and send any message. It will reply with your numeric user ID (a plain integer such as
123456789).Edit config.toml
Open Replace
~/.hiroshi/config.toml and add (or update) the [telegram] section:YOUR_BOT_TOKEN_HERE with the token from BotFather and 123456789 with your actual user ID. Add more integers to allowed_user_ids to authorise additional users.Restart the daemon
Apply the new configuration by restarting Hiroshi:Or, if you are running it manually:
Configuration fields
Set to
true to activate the Telegram gateway. Defaults to false.Your Telegram bot token as issued by @BotFather. Looks like
1234567890:ABCDEFabcdef....Numeric Telegram user IDs that are authorised to interact with Hiroshi. Matching is performed on the immutable numeric ID, never on display names, which prevents display-name forgery attacks. Add one integer per authorised user. An empty list blocks all users — you must list at least one ID to receive messages.
Security
Hiroshi evaluates every incoming Telegram message against theallowed_user_ids list before forwarding it to the agent. Messages from IDs not in the list are silently dropped.
To allow all Telegram users to interact with Hiroshi (not recommended for personal deployments), set allowed_user_ids to an empty array. This puts the gateway into open mode — any user who messages your bot can reach the agent.