LaraCopilot
LaraCopilot
Integrations

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

  1. Open Telegram and search for @BotFather
  2. Send the command /newbot
  3. Follow the prompts: choose a display name, then a username (must end in bot, e.g. mylarabot)
  4. BotFather responds with your bot API token — copy it

Step 2 — Pair the bot with LaraCopilot

  1. In LaraCopilot, go to Telegram Bot in the sidebar
  2. Paste your bot API token in the input field
  3. Click Pair Bot
  4. If pairing succeeds, the page shows your bot's name and username with a Connected status

Using your Telegram bot

Once paired:

  1. Open Telegram and search for your bot by its username
  2. Send /start to begin
  3. 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:

CardDescription
StatusActive or Inactive — whether the bot responds to messages
Last ActivityWhen a user last sent a message to the bot
Paired DateWhen 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

  1. Click Unpair Bot
  2. 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:

  1. Click Register Webhook — this opens a Telegram API URL in a new tab
  2. The page should display {"ok":true} — this confirms the webhook is registered
  3. 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

ProblemSolution
"Failed to pair bot"Double-check the API token from BotFather
Bot doesn't respondCheck that the status is Active on the Telegram Bot page
Webhook Setup Required bannerFollow the webhook registration steps above
Bot responds slowlyThis is normal — AI responses take a few seconds

On this page