#111 Twilio SMS API

16/02/2023
send sms sms

Twilio makes it super easy to send SMS from your Ruby app.

In this episode we will:

  • get Twilio API credentials
  • get a Twilio phone number from which we will send SMS
  • verify a test phone number for receiving SMS in development
  • write an SmsService that we can call from anywhere in our app
  • ensure that when using the SmsService we don't send SMS to a real phone number
  • explore the Twilio SMS Dashboard

Episode source code: https://github.com/corsego/111-twilio-sms-api/commit/5cecefabfc2228207989677c1dd5b54b21cf9218
Based on this blogpost: https://blog.corsego.com/rails-twilio-sms-api

Don't worry, I've updated my twilio credentials. Don't forget to never expose yours!

0:00 Do you need SMS in 2023?
1:02 Install Twilio Ruby in a Rails app
2:52 Get Twilio API keys, phone number and whitelist countries
5:50 Try sending an SMS
6:22 Make Twilio SmsService generic
8:50 Send generic SMS message
9:53 Summary of code changes
11:09 Explore Twilio dashboard

0
Join the conversation
Sign in to access PRO lessons, access private repos, leave comments, create watch lists.
We collect your email address, name and username to create your account. We do not share your email address with anyone else.