Skip to content

An example Twilio SMS Ruby chatbot integrated with Dialog Analytics

License

Notifications You must be signed in to change notification settings

dialoganalytics/twilio-sms-ruby-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Twilio SMS Ruby Chatbot

An example Twilio SMS Ruby chatbot integrated with Dialog Analytics. Built with twilio/twilio-ruby.

Getting started

Clone this repository and run bundle install

Create an account on https://app.dialoganalytics.com, grab your Dialog API token and bot ID.

Set environment variables in .env:

DIALOG_API_TOKEN=...
DIALOG_BOT_ID=...

Get your Twilio Account SID and Auth Token from http://www.twilio.com/console

Get a Twilio phone number from http://www.twilio.com/console/phone-numbers, create a Programmable SMS service and set the inbound settings request url to the endpoint on which this server will be listening: this should be something like https://f562681e.ngrok.io/sms.

Local development: When developping locally, use a service like https://ngrok.com to expose a server running on your machine.

$ ngrok http 4567

Start the bot:

$ ruby bot.rb

Send a SMS to the phone number you defined previously. Messages will be sent to Dialog's API.

Go further

Read more on how to make the most out of the possibilities offered by Dialog here: https://dialoganalytics.com

Releases

No releases published

Packages

No packages published

Languages