Welcome to Developing with DocuSign. I'm Karissa Jacobsen, a member of the Developer Center team.
In this screencast, I'll walk through installing and running the Ruby Quickstart on a Mac,
and the embedded signing code example. To follow along in this demo, you'll first need
to download a Ruby Quickstart. If you haven't yet downloaded your Ruby Quickstart, please
first follow the steps in the Quickstart overview page or the How to Download Quickstart Video.
Quickstart is a software wizard that packages a personalized code example launcher.
You can choose from eight programming languages. The Quickstart wizard configures an app in the
developer's DocuSign account that can make API calls. These steps are completed for the
developer-- the launcher is downloaded from GitHub as a ZIP file; an integration key is
created in the developer's account; a secret key is created to enable Authorization Code Grant;
an RSA key pair is created to enable JWT Grant; redirection URLs are added;
and the configuration file is modified with the developer's personalized information.
You can find all the prerequisites for the Ruby Quickstart in the readme on our GitHub page,
at GitHub.com/DocuSign/code-examples-ruby. This readme is also included in the Quickstart ZIP
file. The readme has a description of all of our API code examples with their source
links to GitHub. In the installation prerequisites section, it says, note,
if you downloaded this code using Quickstart from the DocuSign Developer Center,
skip items one and two, as they were automatically performed for you
To install and run the Ruby launcher, I'll need Ruby version 2.7.2 or later. If you're using a
later version of Ruby, you'll need to update the GemFile accordingly. In the installation steps in
the readme, it says, note, if you downloaded this code using Quickstart from the Document Developer
Center, skip step four, as it was automatically performed for you. Next, it says one,
extract the Quickstart ZIP file or download or clone the code-examples-ruby repository.
The Quickstart automatically downloads into my Downloads folder. I'll extract my Quickstart
ZIP file into my Source folder. Here in my extracted Quickstart folder, you can see that
the Quickstart Wizard appends a dash and the code language on the end of my Quickstart folder name.
Quickstart enables developers to quickly run DocuSign code examples by configuring
a launcher with the developer's account information. For the Ruby Quickstart,
this configuration file is located in the Config folder and is named appsettings.yml.
Aside from my email address and name, my unique integration key,
integration secret, and impersonated user GUID are also displayed in the configuration file.
In my DocuSign developer account, OAuth elements have DocuSign names.
I can find these OAuth elements on the Apps and Keys page. My impersonated user GUID is
called the API Username. And is located under My Account Information. My integration key
can be found under Apps and Integration Keys next to my App Name, Tally_Customer_Portal.
In addition, my integration secret is called a secret key and can be found by selecting
the Actions button next to my App Name then choosing Edit. The secret key is located under
Authentication. If I forget my secret key, I can create a new one by selecting Add Secret
Key and pasting it in my appsettings.yml file. Since the appsettings.yml file
contains personal information, please don't store in your source control.
I can also view and modify the source files in my Quickstart folder,
and see my changes when running that code example. The Ruby Quickstart launcher will
directly open the embedded signing code example page, which I'll show later.
Here's the code for the embedded signing in the app/services/e_sign folder. On line 95,
I'll change the name of the DocuSign document from Lorem Ipsum to Hello world and save my changes.
This name will be shown when the document is presented in the browser. Moving on to
step two from the readme, which says two, in your command line environment, switch to the folder,
cd Quickstart folder. I'll use Terminal to navigate to my extracted Quickstart folder,
Tally_Customer_Portal-rub. Next, I'll install all dependencies using step three, bundler install.
Now I can run the Ruby launcher using step five, rails s. And view the application with step six,
open a browser to localhost on port 3000. The Quickstart will automatically
attempt to authorize the user using the authorization Code Grant flow when first run.
I see the consent window from this application, Tally_Customer_Portal. This consent window grants
the app permission to perform actions on behalf of the user within the signature scope. This is
required to call most e-signature API endpoints, including the first of our code examples,
embedded signing. All Quickstarts are set up to run this example when they first launch. When the
user selects Accept to grant that permission, DocuSign gives the app an authorization code
that can be exchanged for an OAuth access token, which DocuSign requires for API calls.
Quickstart also adds a docusignprivatekey.text file and configures my appsettings.yml file for
JSON Web Token, or JWT Grant. So I could select that flow after completing embedded signing.
Once the user has granted consent to an application, they will not be prompted again
for actions under the specified scope, unless consent is revoked. Now that I've authorized
the app and received an access token, I see the embedded signing code example. Embedded signing
demonstrates how to collect signatures directly within my app without emailing the signer.
Also linked are the API methods used, envelopes create and envelope views create recipient.
The links will take me to the Developer Center pages that describe those methods. The link to
the source file will show me the Ruby code for embedded signing and GitHub. The signer email
and name have been pre-populated with my developer account information, but I could choose to change
those values. Once I select Submit to send the envelope, I'm taken directly to the document.
Now, I'll scroll to the bottom of the document, and see that the document name is no longer Lorem
Ipsum, but has been changed to Hello World I'll sign the document and select Finish. I'm then
taken to the Sign and Complete page. I'll select Continue. Now I see the Ruby launcher homepage
with all the code examples. I can run the other code examples as well. All these code examples are
also available in the other Quickstart launchers, Bash, C#, Java, Node, PHP, PowerShell, and Python.
If you have any questions about how to develop your integration with DocuSign,
here are some resources. I recommend checking out the Developer Center How-to Guides,
going to Stack Overflow, reaching out to support, or signing up for API office hours.
That's it. Thanks for tuning in. If you're watching from our YouTube channel,
please post questions and comments below the video, or email us at developers@docusign.com.