You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -88,31 +88,31 @@ For a list of code examples that use the Admin API, see the [How-to guides overv
88
88
1. In your command-line environment, switch to the folder:
89
89
`cd <Quickstart folder>` or `cd code-examples-python`
90
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`.
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/.env.example` and save the copy as `app/.env`.
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 .env as your `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 .env as your `CLIENT_SECRET`.
94
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.
95
+
1. Set a name and email address for the signer. In .env, save an email address as `SIGNER_EMAIL` and a name as `SIGNER_NAME`.
96
+
**Note:** Protect your personal information. Please make sure that .env will not be stored in your source code repository.
97
97
1. Run the launcher:`python run.py`
98
98
**Note:** You will need to alias the python command to run Python 3 or use `python3 run.py`
99
99
1. Open a browser to http://localhost:3000
100
100
101
101
### Installation steps for JWT Grant authentication
102
102
103
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"`.
104
+
Also, in order to select JSON Web Token authentication in the launcher, in app/.env, change the `QUICKSTART_VALUE` setting to `"false"`.
105
105
106
106
1. Extract the Quickstart ZIP file or download or clone the code-examples-python repository.
107
107
1. In your command-line environment, switch to the folder: `cd <Quickstart folder>` or `cd code-examples-python`
108
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`.
109
+
1. To configure the launcher for [JWT Grant](https://developers.docusign.com/platform/auth/jwt/) authentication, create a copy of the file `app/.env.example` and save the copy as `app/.env`.
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 .env as your `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 .env as your `CLIENT_ID`.
112
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
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.
114
+
1. Set a name and email address for the signer. In .env, save an email address as `SIGNER_EMAIL` and a name as `SIGNER_NAME`.
115
+
**Note:** Protect your personal information. Please make sure that your .env and private.key files will not be stored in your source code repository.
116
116
1. Run the launcher:`python run.py`
117
117
**Note:** You will need to alias the python command to run Python 3 or use `python3 run.py`
118
118
1. Open a browser to http://localhost:3000
@@ -143,7 +143,7 @@ Follow the instructions below if you downloaded the JWT grant remote signing exa
143
143
144
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
145
146
-
Once you've created a payment gateway, save the **Gateway Account ID** GUID to ds_config.py.
146
+
Once you've created a payment gateway, save the **Gateway Account ID** GUID and **Getaway Account Name and Display Name**to .env.
"documentation": "", # Use an empty string to indicate no documentation path.
39
-
"quickstart": "{QUICKSTART_VALUE}"
44
+
"quickstart": os.environ.get("QUICKSTART_VALUE"),
45
+
"quick_acg": False
40
46
}
41
47
42
48
DS_JWT= {
43
-
"ds_client_id": "{INTEGRATION_KEY_JWT}",
44
-
"ds_impersonated_user_id": "{IMPERSONATED_USER_ID}", # The id of the user.
49
+
"ds_client_id": os.environ.get("CLIENT_ID"),
50
+
"ds_impersonated_user_id": os.environ.get("USER_ID"), # The id of the user.
45
51
"private_key_file": "./app/private.key", # Create a new file in your repo source folder named private.key then copy and paste your RSA private key there and save it.
0 commit comments