Skip to content
/ nexmo Public
forked from Vonage/vonage-ruby-sdk

A simple wrapper for the Nexmo API

Notifications You must be signed in to change notification settings

dixia/nexmo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A simple wrapper for the Nexmo API

Requirements

Ruby 1.9; Ruby 1.8 is not currently supported.

Installation

gem install nexmo

Quick Start

require 'nexmo'

nexmo = Nexmo::Client.new('...API KEY...', '...API SECRET...')

response = nexmo.send_message({
  from: 'RUBY',
  to: '...NUMBER...',
  text: 'Hello world'
})

if response.success?
  puts "Sent message: #{response.message_id}"
elsif response.failure?
  raise response.error
end

Troubleshooting

Phone numbers should be specified in international format.

The Nexmo documentation contains a list of error codes which may be useful if you have problems sending a message.

Bugs/Issues

Please report all bugs/issues via the GitHub issue tracker.

About

A simple wrapper for the Nexmo API

Resources

Stars

Watchers

Forks

Packages

No packages published