Skip to content

Instantly share code, notes, and snippets.

@david-dcp
Created March 23, 2017 15:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save david-dcp/fb8bf40928b41281b3876d08a0f3e675 to your computer and use it in GitHub Desktop.
Save david-dcp/fb8bf40928b41281b3876d08a0f3e675 to your computer and use it in GitHub Desktop.
require 'zensend'
client = ZenSend::Client.new("auxX2MQV4bTI23kemRUr2g")
begin
result = client.send_sms(
originator: "FromZensend",
# Add your number here to send a message to yourself
# The number should be in international format.
# For example GB numbers will be 447400123456
numbers: ["004479xxxxxxxx"],
body: "Hello World - from Zensend!"
)
puts result.inspect
rescue ZenSend::ZenSendException => e
puts "ZenSendException: #{e.parameter} => #{e.failcode}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment