Class: Authy::PhoneVerification

Inherits:
API
  • Object
show all
Defined in:
lib/authy/phone_verification.rb

Constant Summary

Constants inherited from API

API::MAX_TOKEN_SIZE, API::MIN_TOKEN_SIZE

Class Method Summary collapse

Methods inherited from API

delete_user, register_user, request_email, request_phone_call, request_qr_code, request_sms, update_user, user_status, verify

Methods included from URL

included

Class Method Details

.check(params) ⇒ Object

options:

:country_code Numeric calling country code of the country.
:phone_number The persons phone number.
:verification_code The verification code entered by the user.


22
23
24
25
# File 'lib/authy/phone_verification.rb', line 22

def self.check(params)
  warn "Authy Phone Verification has been superseded by the Twilio Verify API. Check https://twil.io/verify-check-ruby to see how to check a verification the Twilio Verify API."
  get_request("protected/json/phones/verification/check", params)
end

.start(params) ⇒ Object

options:

:via (sms|call)
:country_code Numeric calling country code of the country.
:phone_number The persons phone number.
:custom_code Pass along any generated custom code.
:custom_message Custom Message.
:code_length Length of code to be sent(4-10).
:locale The language of the message received by user.


11
12
13
14
15
16
# File 'lib/authy/phone_verification.rb', line 11

def self.start(params)
  warn "Authy Phone Verification has been superseded by the Twilio Verify API. Check https://twil.io/verify-start-ruby to see how to start a verification with the Twilio Verify API."
  params[:via] = "sms" unless %w(sms call).include?(params[:via])

  post_request("protected/json/phones/verification/start", params)
end