documentation/docs/experimental/remote-access/telegram-gateway.md
The Telegram Gateway lets you interact with goose through Telegram, enabling remote access from any device where Telegram is available.
:::warning Experimental Feature The Gateway feature is experimental and in active development. Behavior and configuration may change in future releases. :::
The Gateway connects your Telegram account to goose through a secure pairing process. Once paired, you can send messages to a Telegram bot that forwards them to goose, and receive formatted responses back in Telegram.
Key details:
Before setting up the Telegram Gateway:
/newbot and follow the prompts to create your bot.123456789:ABCdefGHIjklMNOpqrsTUVwxyz).:::tip Keep your bot token secure. Anyone with the token can control your bot. :::
Use the goose CLI to start the gateway and pair your Telegram account.
In one terminal, export your bot token and start the gateway:
export TELEGRAM_BOT_TOKEN="YOUR_BOT_TOKEN"
goose gateway start telegram --bot-token "$TELEGRAM_BOT_TOKEN"
Leave this command running. Your computer must remain awake and online for the bot to respond.
In a second terminal, generate a pairing code:
goose gateway pair telegram
Open your bot in Telegram and send it the six-character pairing code within five minutes. The bot confirms when pairing is complete, and you can then chat with goose through Telegram.
To stop the gateway, press <kbd>Ctrl</kbd>+<kbd>C</kbd> in the terminal where it is running.
Once paired, you can:
goose gateway start command is still running.