Skip to content

Nexmo Quickstart Examples for Ruby on Rails

License

Notifications You must be signed in to change notification settings

Nexmo/nexmo-rails-quickstart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nexmo APIs Quickstart Examples for Ruby on Rails

The purpose of the quickstart guide is to provide simple examples focused on one goal. For example, sending an SMS, handling an incoming SMS webhook or making a Text to Speech call.

Configure with Your Nexmo API Keys

To use this sample you will first need a Nexmo account. Once you have your own API credentials, rename the .env.example file to .env and set the values as required.

For some of the examples you will need to buy a number.

Setup

$ git clone git@github.com:Nexmo/nexmo-rails-quickstart.git
$ cd nexmo-rails-quickstart
$ cp .env.example .env
$ bundle install
$ rake db:create
$ rake db:migrate
$ rails server

Tutorials & Sample Code

SMS

Tutorial Code Sample
How to Send SMS Messages with Ruby on Rails outbound_sms_controller.rb
How to receive an SMS Delivery Receipt with Ruby on Rails sms_delivery_receipts_controller.rb
How to Receive SMS Messages with Ruby on Rails inbound_sms_controller.rb

Voice

Tutorial Code Sample
How to Make an Outbound Text-to-Speech Phone Call with Rails outbound_calls_controller.rb
How to receive an Call Event webhook with Ruby on Rails call_events_controller.rb
How to Handle Inbound Phone Calls with Ruby on Rails inbound_calls_controller.rb

Request More Examples

Please raise an issue to request an example that isn't present within the quickstart. Pull requests will be gratefully received.

Licenses

  • The code samples in this repo is under MIT

  • The tutorials contents are under Creative Commons, CC-BY-SA 4.0