Twilio
Connect your Twilio account so the LaraCopilot AI agent and your generated apps can send SMS, WhatsApp, and OTP messages to your users.
LaraCopilot can connect to your own Twilio account so that both the AI assistant and the apps you generate can send SMS and WhatsApp messages. You add your Twilio credentials once at the account level, and they're forwarded to the AI on each request and synced into every generated project's .env.
This integration is messaging-only — it wires up sending SMS/WhatsApp (and OTP-style verification flows). It does not configure Twilio Voice, Video, or other Twilio products.
Step 1 — Get your Twilio credentials
- Sign in to the Twilio Console
- From the dashboard, copy your Account SID and Auth Token
- Note the phone number(s) you've provisioned for SMS, and — if you use WhatsApp — your WhatsApp-enabled sender
A Twilio trial account works too. On a trial account you can only send to numbers you've verified in the Twilio Console, and every message is prefixed with "Sent from a Twilio trial account."
Step 2 — Connect Twilio to LaraCopilot
- In LaraCopilot, open Twilio from the sidebar
- Fill in the connection form:
| Field | Required | Notes |
|---|---|---|
| Account SID | Yes | From your Twilio Console dashboard |
| Auth Token | Yes | From your Twilio Console dashboard |
| Default From (SMS) | No | The number SMS is sent from by default |
| WhatsApp From | No | Your WhatsApp-enabled sender (include the whatsapp: prefix) |
| Messaging Service SID | No | Use a Twilio Messaging Service instead of a single number |
| Account label | No | A friendly name to identify this account |
- Click Save — LaraCopilot verifies the credentials against Twilio and, on success, shows a Connected status
Once connected, the page can look up the numbers available on your account and offer them when choosing a default From number.
WhatsApp senders must be approved by Twilio (or set up through the WhatsApp sandbox) before they can send. Always include the whatsapp: prefix on a WhatsApp From number, e.g. whatsapp:+14155238886.
How your apps use Twilio
When your account has a Twilio connection, the credentials are:
-
Forwarded to the AI agent per request, so it knows your connected sender details when generating messaging code
-
Synced into each generated project's
.envas:TWILIO_ACCOUNT_SID=... TWILIO_AUTH_TOKEN=... TWILIO_FROM=... # default SMS sender TWILIO_WHATSAPP_FROM=... # WhatsApp sender (whatsapp: prefix) TWILIO_MESSAGING_SERVICE_SID=... # optional
Generated apps call Twilio's REST API directly through Laravel's HTTP client — no Twilio SDK is installed or required. Sends are typically queued so they don't block requests.
When generating code, the AI only writes the messaging logic — it does not send a live message. It will send a real test message only when you explicitly ask it to (for example, "send a test SMS to my verified number").
Connection status
The Twilio page shows the details of your saved connection, including the account label, the last four characters of your Account SID, your default From and WhatsApp numbers, any Messaging Service SID, and whether the account is a trial account.
Disconnecting
To remove the connection, click Disconnect (or Remove) on the Twilio page. Your stored credentials are deleted. Existing generated projects keep the values already written to their .env until you change or regenerate them.
Troubleshooting
| Problem | Solution |
|---|---|
| "Something went wrong with Twilio" after saving | Re-check the Account SID and Auth Token — they're copied exactly from the Twilio Console dashboard. |
| Messages don't arrive on a trial account | Verify the recipient number in the Twilio Console; trial accounts can only message verified numbers. |
| WhatsApp messages fail | Confirm your WhatsApp sender is approved (or in the sandbox) and that the number includes the whatsapp: prefix. |
| No numbers appear to choose from | Make sure the credentials are saved and valid; the number list is fetched live from your Twilio account. |
Telegram Bot
Connect a Telegram bot to chat with LaraCopilot's AI assistant from anywhere — generate apps and send follow-up prompts directly from Telegram.
Figma
Connect Figma so LaraCopilot can import your design frames as context — reading the rendered frame and its exact styles to generate matching UI.