Skip to content

Instantly share code, notes, and snippets.

@david-dcp
Created March 23, 2017 15:06
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/667ac4eb6c9ebfcb02c158b9092a91f5 to your computer and use it in GitHub Desktop.
Save david-dcp/667ac4eb6c9ebfcb02c158b9092a91f5 to your computer and use it in GitHub Desktop.
require 'zensend'
client = ZenSend::Client.new("demo_psfeZaipx8P12gBJotkzQ4XNB/xPJ6rP1HbvfS2qftI=")
begin
result = client.send_sms(
originator: "Zensend",
# 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: ["XXXXXXXXXXXX"],
body: "Hello 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