Unimatrix Ruby SDK

Gem Version Release GitHub license

The Unimatrix Ruby SDK provides convenient access to integrate communication capabilities into your Ruby applications using the Unimatrix HTTP API. The SDK provides support for sending SMS, 2FA verification, and phone number lookup.

Getting started

Before you begin, you need an Unimatrix account. If you don't have one yet, you can sign up for an Unimatrix account and get free credits to get you started.

Documentation

Check out the documentation at unimtx.com/docs for a quick overview.

Installation

The recommended way to install the Unimatrix SDK for Ruby is to use the gem package manager, which is available on RubyGems.

Run the following command to add uni-sdk as a dependency to your project:

gem install uni-sdk

If you are installing via Bundler, add this line to your application's Gemfile:

gem 'uni-sdk'

Usage

The following example shows how to use the Unimatrix Ruby SDK to interact with Unimatrix services.

Send SMS

Send a text message to a single recipient.


require 'uni-sdk'

client = Uni::Client.new('your access key id', 'your access key secret')

begin
  resp = client.messages.send({
    to: 'your phone number', # in E.164 format
    signature: 'your sender name',
    content: 'Your verification code is 2048.'
  })
  puts resp.data
rescue Uni::UniError => e
  puts 'Exception: ' + e.message
end

Reference

Other Unimatrix SDKs

To find Unimatrix SDKs in other programming languages, check out the list below:

License

This library is released under the MIT License.