Skip to content

Latest commit

 

History

History
51 lines (32 loc) · 1.02 KB

README.md

File metadata and controls

51 lines (32 loc) · 1.02 KB

A simple wrapper for the Nexmo API Build Status

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.