Connect your app to Twilio
You can connect your Lovable app to Twilio to send texts, make calls, and use WhatsApp for communication. This lets your app interact with users directly through their phones.
Anyone building an app that needs to send messages, make calls, or verify phone numbers for users will need this.
Do this, in order
- 1
Sign in to the Twilio Console and go to 'Account' then 'API keys & tokens'.
This is where you create the special keys Lovable needs to talk to Twilio.
- 2
Click 'Create API key', give it a name like 'Lovable integration', choose your Twilio account's region, keep 'Key type' as 'Standard', and click 'Create API key'.
You are making a secure key that Lovable will use instead of your main account password.
- 3
Copy both the 'SID' (starts with SK) and the 'Secret' that Twilio shows you, and save them somewhere safe immediately.
The Secret is only shown once, and you'll need both of these for the next step.
- 4
Copy your 'Account SID' (starts with AC) from the Twilio Console home page.
This unique ID identifies your Twilio account to Lovable.
- 5
In Lovable, open 'Connectors' and select 'Twilio', then click 'Add connection'.
This starts the process of linking your Twilio account to Lovable.
- 6
Give your connection a 'Display name' (e.g., 'Twilio Prod'), select the same 'Region' you chose for your API key, paste your 'Account SID', 'Standard API Key SID', and 'API Key Secret' into the correct fields.
This tells Lovable how to identify and securely connect to your specific Twilio account.
- 7
Decide who can use this connection by adjusting the 'Sharing' settings; by default, it's private to you.
You control who in your team can use this Twilio connection in their projects.
- 8
Click 'Connect'.
Lovable will check if the details are correct and establish the link to Twilio.
Paste this into your project
Hey Lovable, I want to connect to Twilio. I have my Twilio Account SID, my API Key SID (starts with SK), and the API Key Secret. My Twilio account is in the United States (US1) region. Please guide me through setting up the connection so my app can send SMS messages.
Words decoded
- Account SID
- A unique ID for your Twilio account, like a username for your whole account.
- API Key SID
- A unique ID for a specific access key you create, like a username for a specific password.
- API Key Secret
- A secret code that works like a password for your API Key SID, allowing Lovable to securely access your Twilio account.
- Webhook URL
- A special web address that Twilio sends information to when something happens, like receiving a new message. Your app listens at this address.
Where people get stuck
- Do not share your API Key Secret publicly, as it functions like a password.
- Ensure your Twilio API key's region matches the region you select in Lovable.
- If handling WhatsApp or MMS media, make sure your Twilio API key has the necessary media permissions (a 'Main' key or a restricted key with media permissions).
- Remember that all Twilio usage is billed directly by Twilio, not Lovable.
- Enable SMS Pumping Protection and review SMS Geo Permissions in Twilio to prevent fraud before sending production SMS.
The short version, steps, decoder and prompt on this page are written automatically from Lovable's own documentation and can lag or misread it. The official page is always the authority.