Skip to content

Commit e793162

Browse files
idme.developers@mail.com
1 parent 2668ed9 commit e793162

1 file changed

Lines changed: 0 additions & 156 deletions

File tree

README.md

Lines changed: 0 additions & 156 deletions
Original file line numberDiff line numberDiff line change
@@ -1,156 +0,0 @@
1-
# Python Launcher Code Examples
2-
3-
### GitHub repo: [code-examples-python](./README.md)
4-
5-
This GitHub repo includes code examples for the DocuSign Admin API, Click API, eSignature REST API, Monitor API, and Rooms API. By default, the launcher will display the eSignature examples. To switch between API code examples, select "Choose API" in the top menu.
6-
7-
8-
## Introduction
9-
10-
This repo is a Python 3 application that supports the following authentication workflows:
11-
12-
* Authentication with DocuSign via [Authorization Code Grant](https://developers.docusign.com/platform/auth/authcode).
13-
When the token expires, the user is asked to re-authenticate. The refresh token is not used.
14-
15-
* Authentication with DocuSign via [JSON Web Token (JWT) Grant](https://developers.docusign.com/platform/auth/jwt/).
16-
When the token expires, it updates automatically.
17-
18-
## eSignature API
19-
20-
For more information about the scopes used for obtaining authorization to use the eSignature API, see [Required scopes](https://developers.docusign.com/docs/esign-rest-api/esign101/auth#required-scopes).
21-
22-
For a list of code examples that use the eSignature API, see the [How-to guides overview](https://developers.docusign.com/docs/esign-rest-api/how-to/) on the DocuSign Developer Center.
23-
24-
25-
## Rooms API
26-
27-
**Note:** To use the Rooms API, you must also [create your Rooms developer account](https://developers.docusign.com/docs/rooms-api/rooms101/create-account). Examples 4 and 6 require that you have the DocuSign Forms feature enabled in your Rooms for Real Estate account.
28-
For more information about the scopes used for obtaining authorization to use the Rooms API, see [Required scopes](https://developers.docusign.com/docs/rooms-api/rooms101/auth/).
29-
30-
For a list of code examples that use the Rooms API, see the [How-to guides overview](https://developers.docusign.com/docs/rooms-api/how-to/) on the DocuSign Developer Center.
31-
32-
33-
## Click API
34-
For more information about the scopes used for obtaining authorization to use the Click API, see [Required scopes](https://developers.docusign.com/docs/click-api/click101/auth/#required-scopes)
35-
36-
For a list of code examples that use the Click API, see the [How-to guides overview](https://developers.docusign.com/docs/click-api/how-to/) on the DocuSign Developer Center.
37-
38-
39-
## Monitor API
40-
41-
**Note:** To use the Monitor API, you must also [enable DocuSign Monitor for your organization](https://developers.docusign.com/docs/monitor-api/how-to/enable-monitor/).
42-
43-
For information about the scopes used for obtaining authorization to use the Monitor API, see the [scopes section](https://developers.docusign.com/docs/monitor-api/monitor101/auth/).
44-
45-
For a list of code examples that use the Monitor API, see the [How-to guides overview](https://developers.docusign.com/docs/monitor-api/how-to/) on the DocuSign Developer Center.
46-
47-
48-
## Admin API
49-
50-
**Note:** To use the Admin API, you must [create an organization](https://support.docusign.com/en/guides/org-admin-guide-create-org) in your DocuSign developer account. Also, to run the DocuSign CLM code example, [CLM must be enabled for your organization](https://support.docusign.com/en/articles/DocuSign-and-SpringCM).
51-
52-
For information about the scopes used for obtaining authorization to use the Admin API, see the [scopes section](https://developers.docusign.com/docs/admin-api/admin101/auth/).
53-
54-
For a list of code examples that use the Admin API, see the [How-to guides overview](https://developers.docusign.com/docs/admin-api/how-to/) on the DocuSign Developer Center.
55-
56-
## Installation
57-
58-
### Prerequisites
59-
**Note:** If you downloaded this code using [Quickstart](https://developers.docusign.com/docs/esign-rest-api/quickstart/) from the DocuSign Developer Center, skip items 1 and 2 as they were automatically performed for you.
60-
61-
1. A free [DocuSign developer account](https://go.docusign.com/o/sandbox/); create one if you don't already have one.
62-
1. A DocuSign app and integration key that is configured to use either [Authorization Code Grant](https://developers.docusign.com/platform/auth/authcode/) or [JWT Grant](https://developers.docusign.com/platform/auth/jwt/) authentication.
63-
64-
This [video](https://www.youtube.com/watch?v=eiRI4fe5HgM) demonstrates how to obtain an integration key.
65-
66-
To use [Authorization Code Grant](https://developers.docusign.com/platform/auth/authcode/), you will need an integration key and a secret key. See [Installation steps](#installation-steps) for details.
67-
68-
To use [JWT Grant](https://developers.docusign.com/platform/auth/jwt/), you will need an integration key, an RSA key pair, and the User ID GUID of the impersonated user. See [Installation steps for JWT Grant authentication](#installation-steps-for-jwt-grant-authentication) for details.
69-
70-
For both authentication flows:
71-
72-
If you use this launcher on your own workstation, the integration key must include a redirect URI of http://localhost:3000/ds/callback
73-
74-
If you host this launcher on a remote web server, set your redirect URI as
75-
76-
{base_url}/ds/callback
77-
78-
where {base_url} is the URL for the web app.
79-
80-
1. Python 3.
81-
1. If you are working on a Windows with a Python version after 3.10 you will also need to install [Microsoft C++ Build Tools](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2022). After installing that run `pip install --upgrade setuptools`.
82-
83-
### Installation steps
84-
85-
**Note:** If you downloaded this code using [Quickstart](https://developers.docusign.com/docs/esign-rest-api/quickstart/) from the DocuSign Developer Center, skip step 4 as it was automatically performed for you.
86-
87-
1. Extract the Quickstart ZIP file or download or clone the code-examples-python repository.
88-
1. In your command-line environment, switch to the folder:
89-
`cd <Quickstart folder>` or `cd code-examples-python`
90-
1. To install dependencies, run: `pip3 install -r requirements.txt` (or pipenv can be used)
91-
1. To configure the launcher for [Authorization Code Grant](https://developers.docusign.com/platform/auth/authcode/) authentication, create a copy of the file app/ds_config_sample.py and save the copy as app/ds_config.py.
92-
1. Add your integration key. On the [Apps and Keys](https://admindemo.docusign.com/authenticate?goTo=apiIntegratorKey) page, under **Apps and Integration Keys**, choose the app to use, then select **Actions > Edit**. Under **General Info**, copy the **Integration Key** GUID and save it in ds_config.py as your `ds_client_id`.
93-
1. Generate a secret key, if you don’t already have one. Under **Authentication**, select **+ ADD SECRET KEY**. Copy the secret key and save it in ds_config.py as your `ds_client_secret`.
94-
1. Add the launcher’s redirect URI. Under **Additional settings**, select **+ ADD URI**, and set a redirect URI of http://localhost:3000/ds/callback. Select **SAVE**.
95-
1. Set a name and email address for the signer. In ds_config.py, save an email address as `signer_email` and a name as `signer_name`.
96-
**Note:** Protect your personal information. Please make sure that ds_config.py will not be stored in your source code repository.
97-
1. Run the launcher:`python run.py`
98-
**Note:** You will need to alias the python command to run Python 3 or use `python3 run.py`
99-
1. Open a browser to http://localhost:3000
100-
101-
### Installation steps for JWT Grant authentication
102-
103-
**Note:** If you downloaded this code using [Quickstart](https://developers.docusign.com/docs/esign-rest-api/quickstart/) from the DocuSign Developer Center, skip step 4 as it was automatically performed for you.
104-
Also, in order to select JSON Web Token authentication in the launcher, in app/ds_config.py, change the `quickstart` setting to `"false"`.
105-
106-
1. Extract the Quickstart ZIP file or download or clone the code-examples-python repository.
107-
1. In your command-line environment, switch to the folder: `cd <Quickstart folder>` or `cd code-examples-python`
108-
1. To install dependencies, run: `pip3 install -r requirements.txt` (or pipenv can be used)
109-
1. To configure the launcher for [JWT Grant](https://developers.docusign.com/platform/auth/jwt/) authentication, create a copy of the file app/ds_config_sample.py and save the copy as app/ds_config.py.
110-
1. Add your User ID. On the [Apps and Keys](https://admindemo.docusign.com/authenticate?goTo=apiIntegratorKey) page, under **My Account Information**, copy the **User ID** GUID and save it in ds_config.py as your `ds_impersonated_user_id`.
111-
1. Add your integration key. On the [Apps and Keys](https://admindemo.docusign.com/authenticate?goTo=apiIntegratorKey) page, under **Apps and Integration Keys**, choose the app to use, then select **Actions > Edit**. Under **General Info**, copy the **Integration Key** GUID and save it in ds_config.py as your `ds_client_id`.
112-
1. Generate an RSA key pair, if you don’t already have one. Under **Authentication**, select **+ GENERATE RSA**. Copy the private key, and save it in a new file named app/private.key.
113-
1. Add the launcher’s redirect URI. Under **Additional settings**, select **+ ADD URI**, and set a redirect URI of http://localhost:3000/ds/callback. Select **SAVE**.
114-
1. Set a name and email address for the signer. In ds_config.py, save an email address as `signer_email` and a name as `signer_name`.
115-
**Note:** Protect your personal information. Please make sure that your ds_config.py and private.key files will not be stored in your source code repository.
116-
1. Run the launcher:`python run.py`
117-
**Note:** You will need to alias the python command to run Python 3 or use `python3 run.py`
118-
1. Open a browser to http://localhost:3000
119-
1. On the black navigation bar, select **Login**.
120-
1. From the picklist, select **JSON Web Token** > **Authenticate with DocuSign**.
121-
1. When prompted, log in to your DocuSign developer account. If this is your first time using the app, select **ACCEPT** at the consent window.
122-
1. Select your desired code example.
123-
124-
125-
## JWT grant remote signing and Authorization Code Grant embedded signing projects
126-
127-
See [DocuSign Quickstart overview](https://developers.docusign.com/docs/esign-rest-api/quickstart/overview/) on the DocuSign Developer Center for more information on how to run the JWT grant remote signing project and the Authorization Code Grant embedded signing project.
128-
129-
### Installation steps for JWT grant remote signing example
130-
131-
Follow the instructions below if you downloaded the JWT grant remote signing example.
132-
133-
1. Extract the Quickstart ZIP file or download or clone the code-examples-python repository.
134-
1. Run the JWT console project: `python jwt_console.py`. If you do not already have the docusign-esign package, it will be
135-
installed for you when you start the project.
136-
**Note:** You will need to alias the python command to run Python 3 or use `python3 run.py`
137-
1. Follow the prompts from the command line to grant consent in your browser.
138-
1. Return to the command line and follow the prompts to enter the names and email addresses of your recipients.
139-
1. Check your email to sign the example document.
140-
141-
142-
## Payments code example
143-
144-
To use the payments code example, create a test payment gateway on the [Payments](https://admindemo.docusign.com/authenticate?goTo=payments) page in your developer account. See [Configure a payment gateway](./PAYMENTS_INSTALLATION.md) for details.
145-
146-
Once you've created a payment gateway, save the **Gateway Account ID** GUID to ds_config.py.
147-
148-
149-
## License and additional information
150-
151-
### License
152-
This repository uses the MIT License. See [LICENSE](./LICENSE) for details.
153-
154-
### Pull Requests
155-
Pull requests are welcomed. Pull requests will only be considered if their content
156-
uses the MIT License.

0 commit comments

Comments
 (0)