Skip to content
RingCentral SDK in Ruby ( Need help? Post your questions to or or send email to
Branch: master
Clone or download
Latest commit da6b3ab Nov 28, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib update style Mar 30, 2018

RingCentral SDK for Ruby

Gem Version Build Status Coverage Status Dependency Status Codacy Badge Code Climate Scrutinizer Code Quality Downloads Docs Docs License

Stack Overflow Chat

Table of contents

  1. Overview
  2. Documentation
  3. Installation
  4. Usage
  5. Synopsis
  6. API Requests 1. Generic HTTP Requests 2. SMS and MMS Examples 3. Fax Examples
  7. Advanced Use Cases
  8. Supported Ruby Versions
  9. Releases
  10. Versioning
  11. Change Log
  12. Links
  13. Contributions
  14. License


A Ruby SDK for the RingCentral REST API.

Important Notes

Version 2.0.0 introduces the following backward breaking changes:

  • SDK instantiation by moving to a block-based configuration
  • Removal of RingCentralSdk::REST::Config class
  • Removal of RingCentralSdk::REST::Client.authorize_user method


Full documentation and resources are available at:

  1. Ruby SDK Developer Guide - Read the Docs
  2. Ruby SDK Reference Guide -

For API information, see the official RingCentral resources:

  1. API Developer and Reference Guide
  2. API Explorer
  3. CTI Tutorial


Via Bundler

Add 'ringcentral_sdk' to Gemfile and then run bundle:

$ echo "gem 'ringcentral_sdk'" >> Gemfile
$ bundle

Via RubyGems

$ gem install ringcentral_sdk



require 'ringcentral_sdk'

client = do |config|
  # App info (mandatory)
  config.app_key = 'myAppKey'
  config.app_secret = 'myAppSecret'
  config.server_url = RingCentralSdk::RC_SERVER_SANDBOX

  # User info for password grant (optional)
  config.username = 'myUsername'
  config.extension = 'myExtension'
  config.password = 'myPassword'

  # Set a custom logger (optional)
  config.logger =

  # Enable HTTP retries for 429, 503, and 504 errors
  # Set custom codes and retry after using retry_options
  config.retry = true

# Send SMS
res = client.messages.sms.create(
  from: '+16505551212',
  to: '+14155551212',
  text: 'Hi there!'

More information on the authorization code flow:

  1. Full documentation
  2. Sinatra example

API Requests

API requests can be made via the included Faraday client or RingCentralSdk::Helpers::Request subclasses. These are described below.

Generic HTTP Requests

To make generic API requests, use included Faraday client which can be accessed via client.http. The client automatically adds the correct access token to the HTTP request and handles OAuth token refresh using the OAuth gem.

This is useful to access many API endpoints which do not have custom wrappers and for debugging purposes.

http = client.http

SMS and MMS Examples


  from: '+16505551212',
  to: '+14155551212',
  text: 'Hi there!'

MMS with media file:

  from: '+16505551212',
  to: '+14155551212',
  text: 'Hi there!',
  media: '/filepath/to/file.ext'

Fax Examples

Fax files:

  to: '+14155551212',
  coverPageText: 'Hi there!',
  files: ['/path/to/myfile.pdf']

Fax text:

  to: '+14155551212',
  coverPageText: 'Hi there!',
  text: 'Hi there!'

Subscription Example

To make subscriptions with RingCentral, use the SDK object to create subscription Observer object and then add observers to it.

# Create an observer object
class MyObserver
  def update(message)
    puts 'Subscription Message Received'
    puts JSON.dump(message)

# Create an observable subscription and add your observer
sub = client.create_subscription

# Subscribe to an arbitrary number of event filters
sub.subscribe ['/restapi/v1.0/account/~/extension/~/presence']

# End the subscription

Advanced Use Cases

  1. Subscribing to All Extensions
  2. Managing Call Queue Member Status

Supported Ruby Versions

This library is tested against this list of Ruby implementations.


Releases with release notes are availabe on GitHub releases. Release notes include a high level description of the release as well as lists of non-breaking and breaking changes.


  • Versions 1.0.0 and above follow semantic versioning. Breaking changes will be indicated by a change in major version.
  • Versions below 1.0.0 are in active development. During initial development (Version 0.x.x), minor version changes will indicate either substantial feature inclusion or breaking changes.

Change Log



Project Repo

RingCentral API Docs

RingCentral API Explorer

RingCentral Official SDKs


  1. Fork it ( )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request


RingCentral SDK is available under an MIT-style license. See for details.

RingCentral SDK © 2015-2017 by John Wang

You can’t perform that action at this time.