Module: Twilioauth

Defined in:
lib/twilioauth.rb

Defined Under Namespace

Classes: Connection

Class Method Summary collapse

Class Method Details

.auth(number, options = {}) ⇒ Object



28
29
30
31
32
33
# File 'lib/twilioauth.rb', line 28

def self.auth(number, options = {})
  connection = Twilioauth::Connection.new(options[:account_sid], options[:auth_token])
  newpin = SecureRandom.hex(3)
  connection.sms(newpin, number)
  return newpin
end