Well, it looks like you will want to use the Ruby library created for Nexmo .
Essentially, you should put this sample code:
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
.. inside the action in your controller. Let's say this is your TextsController , and you put it under the create action. So in your config/routes.rb put something like:
match "/sendtext" => "texts#create"
Then you just hit mydomain.com/sendtext and the team should fire.
source share