SMS and WhatsApp
Connect Twilio to your app
What is Twilio?
Twilio is a company that sends text messages (and makes calls) for apps, from a phone number it gives you.
- What it costs
- Free trial with no card: about 100 text messages, for 30 days. On the trial you can only text numbers you have verified. After that you pay per message.
- Time needed
- About 15 minutes. You need an email address and your phone.
- If you skip it
- Your app still works. Only the text messages stay off until you connect it.
What you can build with Twilio
How to get it, step by step
Create your account
- Open twilio.com/try-twilio and sign up. Confirm your email and your phone number, and answer the short questions.
Get your account ID and secret code
- Open the Twilio Console home page (console.twilio.com).
- Find Account SID and Auth Token there. Press to reveal the Auth Token, then copy each.
Get a phone number
- On the Console home page, press Get a phone number — or open Phone Numbers, then Manage, then Buy a number. On the trial it uses your free credit.
- On the trial, add each phone you want to text as a Verified Caller ID first.
Which value goes in which box
- Account SID
TWILIO_ACCOUNT_SIDNot secret - The Account SID: 34 characters starting with AC. An “account ID” says whose account it is.
- Auth Token
TWILIO_AUTH_TOKENKeep private - The Auth Token: a secret code that proves it is you, like a password for apps.
- Twilio phone number
TWILIO_FROM_NUMBERNot secret - Your Twilio number with + and the country code, no spaces — for example +15551234567. Not your own phone number.
Watch out for
- On the free trial, texts only reach numbers you verified, and only in your own country.
- The Auth Token is secret. Keep it private, like a password.
- The trial ends after 30 days; upgrade from the Console when you are ready.