From DocuSign, I'm Robert Knight, a member of the developer center team.
In this screen cast, I'll walk you through installing and running the Bash Quickstart
on Windows and the embedded signing code example. The prerequisite to this video
is a Quickstart ZIP file. If you haven't yet downloaded your Bash Quickstart ZIP file, 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,
runnable set of code examples we call a launcher. You can choose from eight programming languages.
Quickstart requires the user to have a DocuSign developer account.
Quickstart will prompt the user to log into their account or create a new one.
Then, Quickstart configure an app in the user's developer account that can make API calls.
When you follow the Quickstart Wizard, the following steps are completed for you.
The launcher is downloaded from GitHub as a zip file. An integration key is created
in your account. A secret key is created to enable Authorization Code Grant. An RSA key
pair is created to enable JSON Web Token Grant. Redirection URLs are added. And
the configuration file is modified with a developer's personalized information.
The prerequisites I'll need to run the Bash Quickstart launcher can be
found in the readme on our GitHub page at github.com/docusign/code-examples-bach.
This readme is also included in the Quickstart ZIP file.
Also in the readme, is a description of all API code examples with their source links to GitHub.
Scrolling to the installation prerequisite section, I see that it says, "Note: If you
downloaded this code using Quickstart from the DocuSign developer center,
skip items 1 and 2 as they were automatically performed for you."
To run the bash launcher, I need a bash terminal. I'll be using the one that comes with VS code.
Looking at the installation steps, I see that it says,
"Note: If you downloaded this code using Quickstart from the DocuSign Developer Center,
skip step 3 as it was automatically performed for you." Step one is extract
the Quickstart ZIP file or download or clone the code-examples-bash repository.
I've chosen to download the zip file in a folder called "Source." This is where I'll extract it.
Now I'm in my extracted Quickstart folder. Note that the Quickstart wizard appends a dash and the
code language on the end of my Quickstart folder name. Quickstart personalizes the launcher by
loading a configuration file with the developer's account information. For the Bash Quickstart,
this configuration file is located in the Config folder and it's named settings.text.
In addition to my email address and name, my unique integration key, secret key,
and impersonation user guid are also in the configuration file.
Since they contain private information, please don't store the settings.text file
or the private.key file in your source control.
On the app and keys page, in my DocuSign developer account, I can see the values that the Quickstart
created and then loaded into my configuration file. The user ID is saved as the impersonation
user guid and the integration key is saved to both integration key JWT and integration key
auth code. When I click the actions dropdown control, next to my app name,
Tally Customer Portal, I can select edit to see more values associated with my app.
Authorization Code Grant has been preselected. There's a secret key,
an RSA key pair, and a number of redirect URIs that have also been created by the Quickstart.
The secret key has been saved as settings.text and the private key of the RSA key pair is saved in
the config directory as the file, private.key. Note that if I forget or delete my secret key,
I can create a new one by selecting add secret key and I can then paste it into my settings.text.
Although there are URIs your eyes I only need the first one, localhost 8080
authorization code callback. The rest are used by Quickstarts for other programming languages.
Switching from my browser window back to VS code, I can view and modify the source
files in my Quickstart folder and see my changes when running that code example.
Here's the code example for embedded signing in the Quickstarts root folder.
The filename is eg001EmbeddedSigning.sh.
I'll change the name of the DocuSign document from Lorem Ipsum to Hello World. This is the name that
will be shown when the document is presented in the browser to the recipient who will sign it.
Step four is run the launcher. In the Quickstarts root folder, open a new batch terminal window in
VS code and execute the command bash launcher.sh. From the API menu, select 1 for e-signature,
then 1 again for use Authorization Code Grant. From here, you'll see the consent window from
the application, Talley Customer Portal. In the Authorization Code Grant flow, the application
obtains the consent from the individual user to perform actions on their behalf, then receives
an authorization code that can be exchanged for an access token, which is required to make API calls.
Since Quickstart also adds a private.key file and configures my settings.text file for JSON
web token or JWT grant, I could select that flow as well. Note that the bash launcher
uses PHP for the Authorization Code Grant flow. You can find the code for this in the
OAuth directory in the code_grant.php file. Once the user has granted consent to an application,
they will not be prompted again, unless consent is revoked. I'll click accept.
Back in the VS code bash terminal, according to the prompt, pressing any key returns the menu for
the e-signature code examples. Embedded signing is the first code example. So 1 launches the
eg001EmbeddedSigning.sh file in the root directory.
In the browser, I see the envelope is populated with the signer name
and email address from the setting.text config file. Scrolling to the bottom of the document,
I can see that the document name is no longer Lorem Ipsum, but has been renamed Hello
World. I'm going to sign the document and click finish. When I'm done, I'm taken to a web based
HTTP response parser. Here I confirm that the signing event has occurred.
Returning to the launcher in VS code, we see a menu with the e-signature code examples.
I can run other code examples by entering their menu number or return to the parent
menu by entering the last option. These code examples are also available in the
other Quickstart launchers-- C f Java, Node.JS, PHP, PowerShell, Python, and Ruby.
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 to the video or email us at developes@docusign.com.