Telegram Bot
Connect a Telegram bot to chat with LaraCopilot's AI assistant directly from Telegram
Telegram Bot
LaraCopilot can be connected to a Telegram bot, letting you interact with the AI assistant and your projects directly from Telegram — without opening a browser.
Setting up your Telegram bot
Step 1 — Create a bot with BotFather
- Open Telegram and search for @BotFather
- Send the command
/newbot - Follow the prompts: choose a display name, then a username (must end in
bot, e.g.mylarabot) - BotFather responds with your bot API token — copy it
Step 2 — Pair the bot with LaraCopilot
- In LaraCopilot, go to Telegram Bot in the sidebar
- Paste your bot API token in the input field
- Click Pair Bot
- If pairing succeeds, the page shows your bot's name and username with a Connected status
Using your Telegram bot
Once paired:
- Open Telegram and search for your bot by its username
- Send
/startto begin - Ask any question — the bot responds with AI-powered answers about Laravel development, your project files, and LaraCopilot features
Bot status
The Telegram Bot page shows three status cards:
| Card | Description |
|---|---|
| Status | Active or Inactive — whether the bot responds to messages |
| Last Activity | When a user last sent a message to the bot |
| Paired Date | When the bot was connected to LaraCopilot |
Activating and deactivating the bot
- Click Activate to turn the bot on — it will respond to Telegram messages
- Click Deactivate to pause it — the bot won't respond until reactivated
This is useful if you want to temporarily disable the bot without unpairing it.
Unpairing the bot
- Click Unpair Bot
- Confirm with Yes, Unpair
The bot is disconnected from LaraCopilot. The bot itself (in Telegram) still exists — you would need to delete it via BotFather if you no longer need it.
Webhook setup (server-side pairing)
If your LaraCopilot server cannot reach Telegram's API directly (e.g. due to firewall restrictions), you'll see a Webhook Setup Required warning after pairing.
To fix this:
- Click Register Webhook — this opens a Telegram API URL in a new tab
- The page should display
{"ok":true}— this confirms the webhook is registered - Your bot is now fully operational
If you don't see {"ok":true}, check that your server's outbound traffic to api.telegram.org is not blocked.
Troubleshooting
| Problem | Solution |
|---|---|
| "Failed to pair bot" | Double-check the API token from BotFather |
| Bot doesn't respond | Check that the status is Active on the Telegram Bot page |
| Webhook Setup Required banner | Follow the webhook registration steps above |
| Bot responds slowly | This is normal — AI responses take a few seconds |