Ruby wrapper for the Telesign Phone Verification API
Pull request Compare This branch is even with mattvv:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



Telesign is a Rails plugin for interacting with the Telesign Phone Verification service.

Installation with Bundler!

Add the following do your bundler file:

  gem "soap4r", :git => "git://"
  gem "telesign", :git => "git://"

And then somewhere in a Rails initializer:

  Telesign::ApiRequest.customer_id = <Your Telesign CustomerID>
  Telesign::ApiRequest.authentication_id = <Your Telesign AuthenticationID>

Sample Usage

PhoneID and Phone Verification calls require a phone object.

phone ="555555555", "United States")

Telesign provides a PhoneID service for identifying phone numbers. This is useful for stopping users from entering phone numbers which are easily obtained, such as Pre-Paid Mobile or Non-Fixed VOIP phones.

identity = Telesign.identify(phone)
=> "US"
=> "San Francisco"

identity.phone_type == Telesign::PhoneType::MOBILE
=> true

Phone Verification requires a random verification code to be read to the callee.

code = Telesign.verification_code

# Calls the phone number provided and reads the callee the verification code
verification =, code)

reference_id = verification.reference_id

You can also verify using a text message:

verification = Telesign.sms(phone, code)

After calling the user, you should save the random code and the reference_id for later use. The random code will be used for comparison with the code entered by your user through a form, which will determine whether they are phone verified or not.

You can also request the status of a specific call, using the previously saved reference_id:

status = Telesign.status(reference_id)

=> true


Fork the project and submit pull requests.