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 Python Quickstart on a Mac and the embedded signing code
example.
To follow along in this demo, you'll
first need to download a Quickstart configured
for Python.
If you haven't yet downloaded your Python 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 Python
Quickstart in the README on our GitHub page
at github.com/docusign/code examples python.
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 steps one and two below, as they're automatically
performed for you.
The Python prerequisite is step three because Quickstart
takes care of step four by prepopulating my developer
account information, which I'll show later.
To install and run the Python launcher, I'll need Python 3.
In the installation steps in the README
it says, note, if you downloaded this code using Quickstart
from the DocuSign Developer Center,
skip steps four and five below, as they're automatically
performed for you.
Next it says, one, extract the Quickstart ZIP file or download
or clone the code examples Python 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 the launcher with the developer's
account information.
For the Python Quickstart, this configuration file is located
in the App folder and is named ds_config.py.
Aside from my email address and name,
my unique client ID, client secret,
and impersonated user GUID are also
displayed in the configuration file.
In my DocuSign developer account,
0Auth elements have DocuSign names.
I can find these 0Auth elements on the Apps and Keys page.
My ds impersonated user ID is called the API username
and is located under My Account Information.
Also, my ds client ID is called the Integration Key
and can be found under Apps and Integration Keys
next to my app name, Tally_Customer_Portal.
In addition, my ds client 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 ds_config.py file.
Since the ds_config.py file contains personal information
such as your name, email address, impersonated user ID,
client ID and client secret, 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 Python Quickstart Launcher will directly
open the embedded signing code example
page, which I'll show later.
Here's the code for embedded signing.
All examples in this Quickstart are
in their own folder with a controller and view file.
I've opened the controller file which defines the methods used
by this example.
On line 96, I'll change the name of the DocuSign document
from example document 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 me which says,
two, switch to the folder, cd_quickstart_folder_name.
I'll use terminal to navigate to my extracted Quickstart folder,
tally_customer_portal-python.
Next I'll install all dependencies using step three,
pip3 install -r requirements.text.
Now I can run the Python launcher using
step six, python three run.py.
And view the application with step seven,
open a browser to http://localhost:5000.
The Quickstart will automatically
attempt to authorize the user using the authorization code
grant flow when first run.
I see the consent window from the 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
and so is needed for the first of our code examples,
embedded signing.
All Quickstarts are set up to run this example
when they first launch.
When the user clicks Accept, to grant that permission,
DocuSign gives the app an authorization code
that can be exchanged for an 0Auth access
token, which DocuSign requires you
to include in your API calls.
Quickstart also adds a private.key file and configures
my ds_config.py 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 it's
gotten its 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 APIs 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 Python code for the embedded signing in GitHub.
The Signer Email and Name have been prepopulated
with my developer account information,
but I could choose to change those values.
Once I click 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 Example Document,
but has been changed to Hello World,
just as I changed it to be.
I'll sign the document and click Finish.
I am then taken to the signing complete page.
I'll click Continue.
Now I see the Python 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.js, PHP, PowerShell,
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 the video
or email us at developers@docusign.com.