Skip to content

philnash/sms-messages-hanami

Repository files navigation

Messages

An example of a Hanami app to receive and respond to incoming SMS messages from Twilio. You can read about how this was created and the decisions took in the blog post How to receive and respond to text messages in Ruby with Hanami and Twilio.

Setup

You'll need a Twilio account, sign up for a free account here, and a phone number that can receive SMS messages.

To tunnel internet traffic to your local development server I recommend ngrok.

Getting started

Clone this repository and install the dependencies:

git clone https://github.com/philnash/sms-messages-hanami.git
cd sms-messages-hanami
bundle install

Run the tests:

bundle exec rake spec

Run the development server:

bundle exec hanami server

Run ngrok:

ngrok http 2300

Take the ngrok URL and add the path /webhooks/sms. Enter that URL as the messaging webhook for your Twilio number.

Send a message to your number and your application will respond with "Hello from Hanami!".

Explore Hanami guides, API docs, or jump in chat for help. Enjoy! 🌸

About

An example application for receiving and responding to SMS messages from Twilio in Hanami

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published