The Official DocuSign Ruby Client

RubyGems version RubyGems downloads Build status

You can sign up for a free developer sandbox.


Ruby 2.1.0 or higher [].


Add this line to your application's Gemfile:

gem 'docusign_esign'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install docusign_esign


To initialize the client and make the Login API Call using the JWT authentication:

    require 'docusign_esign'
    require 'uri'

    host = ''
    integrator_key = '[REQUIRED]'
    user_id = '[REQUIRED]'
    expires_in_seconds = 3600 #1 hour
    auth_server = ''
    private_key_filename = '[REQUIRED]'

    # STEP 1: Initialize API Client
    configuration = = host

    api_client =
    api_client.configure_jwt_authorization_flow(private_key_filename, auth_server, integrator_key, user_id, expires_in_seconds)

    # STEP 2: Initialize Authentication API using the API Client
    authentication_api =

    # STEP 3: Make the login call
     = authentication_api.()

    if !.nil?
        ..each do ||
            if .is_default == "true"
                # STEP 4: Extract the user information
                base_url = .base_url
                 = .

                puts base_url

                # IMPORTANT: Use the base url from the login account to update the api client which will be used in future api calls
                base_uri = URI.parse(base_url)
   = "%s://%s/restapi" % [base_uri.scheme,]

See unit_tests_using_jwt_spec.rb for more examples.


Unit tests are available in the tests/spec folder.

Follow the steps below to run the test cases

  • Fill in all the required fields/values
  • Run the following command from the tests/spec folder

    bundle exec rspec <spec_filename>


Feel free to log issues against this client through GitHub. We also have an active developer community on Stack Overflow, search the DocuSignAPI tag.


The DocuSign Ruby Client is licensed under the following License.