Skip to content

cskonopka/ArtOfWarSMS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Send Art of War quotes to friends using Twilio SMS

Summary

This is an example of how to create a call & response Sms service using Go, Ngrok and Twilio. The Go server is used to create a feedback loop that will receive an incoming Sms and route the incoming Sms number to a function that will send a response Sms. Ngrok is used to port forward api calls to a specified Twilio phone number that is connected via a webhook. After a user sends the initial Sms, a response Sms is sent back containing a quote from Sun Tzu's Art of War.

Requirements

How to run

  1. Add your Twilio credentials to the file twilioArtOfWarSms.go
  2. Start the go application
    • go run twilioArtOfWarSms.go
  3. Start a ngrok server
    • ngrok http 8027
  4. Copy the the "Forwarding" url
  5. Navigate to your Twilio dashboard, select an active number and navigate to the "Messaging" section
  6. Paste the "Forwarding" url in the "A message comes in" section as a HTTP Post Webhook

About

Send a sms & receive an Art of War quote using Twilio

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages