Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
26 lines (20 sloc) 468 Bytes
require 'dotenv'
Dotenv.load
NEXMO_API_KEY = ENV['NEXMO_API_KEY']
NEXMO_API_SECRET = ENV['NEXMO_API_SECRET']
RECIPIENT_NUMBER = ENV['RECIPIENT_NUMBER']
require 'nexmo'
client = Nexmo::Client.new(
api_key: NEXMO_API_KEY,
api_secret: NEXMO_API_SECRET
)
response = client.verify.request(
number: RECIPIENT_NUMBER,
brand: 'AcmeInc'
)
if response.status == '0'
# display the Verify `request_id`
puts response.request_id
else
puts response.error_text
end
You can’t perform that action at this time.