From DocuSign, I'm Mei Hsieh, a member of the Developer Center
Team.
In this screencast, I'll walk through installing and running
the Java Quickstart and the Embedded Signing code example.
The prerequisite to this video is an unzipped Quickstart ZIP
file.
If you haven't yet downloaded your Java 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.
An integration key is created in the developer's account.
A secret key is created to enable Authorization Code
Grant.
An RSA key is created to enable JWT Grant.
Redirection URLs are added.
And the configuration file is modified with the developer's
personalized information.
To run the Java Quickstart launcher,
I must have the Java prerequisite
software installed.
This list of prerequisites can be
found in the README file located in my unzipped Quickstart
file, which I've named Tally Customer Portal.
This README is also available on our GitHub page
at github.com/docusign/code examples java.
The README file has a description
of all the API code examples, with their source links
to GitHub.
I'll scroll to the Installation Prerequisites section.
It says, "NOTE: If you downloaded this code using
Quickstart from the DocuSign Developer Center,
skip steps 1 and 2 below, as they're automatically
performed for you."
The Java prerequisites are steps 3 and 4,
because Quickstart takes care of step 5,
by pre-populating my developer account information,
which I'll show later.
In order to install and run the Java launcher,
I'll need JDK 11 or later and Maven.
I can follow the links to download the applications.
Since I'm using the IntelliJ Ultimate IDE,
I'll scroll to the IntelliJ Ultimate instructions
in the README file.
There are also instructions for Eclipse IDE.
In the first sentence, there's a link
to download IntelliJ Ultimate IDE.
Next it says, "Note: if you downloaded this code using
Quickstart from the DocuSign Developer Center,
skip step 1 as it was automatically
performed for you."
Since I've downloaded the Quickstart,
I will go directly to step 2.
Step 2, start IntelliJ Ultimate, and choose the open or import
option.
Step 3, use the popup file chooser
to select code-examples-java or your unzipped Quickstart
directory.
I'll select Tally Customer Portal,
the name of my unzipped Quickstart directory.
Step 4, click OK, and the project
will be displayed in the IDE.
Per instructions, I'll click OK.
Now on the README, I'm in "Configuring IntelliJ's
Run/Debug Configuration."
Step 1, use the menu command Run Edit configurations...
To open the configuration manager.
Step 2, under templates in the left sidebar,
select Spring Boot.
Step 3, update the form with the Name
of the configuration to code-examples-java
and the Main class for the configuration,
com.docusign.App.
Tip, use the ellipses button next to the field
to choose the Main class.
Under Spring Boot, select the Enable debug output checkbox.
In the project window, I see the folder structure
of the unzipped file.
Quickstart enables developers to quickly run docusign code
examples by configuring a launcher with the developer's
account information.
For the Java launcher, this configuration file
is located in the src/main/resources folder,
and is named application.json.
Aside from my email address and name, my unique client ID,
client secret, and impersonated user
ID are also displayed in the configuration file.
In my DocuSign developer account,
the client ID is called the integration key.
Client ID is the standard OAuth term.
Integration key is the DocuSign term.
Since it contains personal information,
please don't store this application.json file
in your source control.
I can also view and modify the src files
in the project window, and see my changes
when running that code example.
The Java Quickstart launcher will directly
open the Embedded Signing code example
page, which I'll show later.
Here's the code for Embedded Signing
in the src/main/java/com.docusign
folder.
The file name is e.g.
0 0 1 controller Embedded Signing.
I will change the name of the file from Lorem Ipsum
to Hello, World.
This name will be shown when the document is
presented in the browser.
I use control S to save my changes.
Now I'm in the running or debugging the launcher section.
Use a run menu option to run or debug the launcher.
From the menu, I'll select Run, then run code-examples-java.
After the application finishes building,
open your browser to http://localhost:8080.
I authenticate with my developer account credentials.
I see the consent window from the application Tally Customer
Portal.
In the Authorization Code grant flow,
the application obtains 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.
Once the user has granted consent to an application,
they will not be prompted again unless consent is revoked.
I click Accept.
Next, I see the Embedded Signing code example.
All Quickstarts are pre-configured to run this 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 EnvelopeViews_createRecipient
The links will take me to the Developer Center pages that
describe those methods.
The link to the source file will show me the code
for Embedded Signing in GitHub.
Now, the signer email and name have
been pre-populated with my developer account information.
I can change the signer email and name.
I click Submit to send the envelope.
I'm taken directly to the document.
Now I 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," per my modification.
I'm going to sign the document, and click Finish.
I'm taken to the Sign and Complete page.
I click Continue.
Now I see the Java 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#, 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.
Please send questions and comments
to developers@docusign.com.