This repo includes a powershell command-line application to demonstrate:
For more information about the scopes used for obtaining authorization to use the eSignature API, see the Required Scopes section
- Use embedded signing. Source. This example sends an envelope, and then uses embedded signing for the first signer. With embedded signing, the DocuSign signing is initiated from your website.
- Request a signature by email (Remote Signing). Source. The envelope includes a pdf, Word, and HTML document. Anchor text (AutoPlace) is used to position the signing fields in the documents.
- List envelopes in the user's account. Source.
- Get an envelope's basic information. Source. The example lists the basic information about an envelope, including its overall status.
- List an envelope's recipients Source. Includes current recipient status.
- List an envelope's documents. Source.
- Download an envelope's documents. Source. The example can download individual documents, the documents concatenated together, or a zip file of the documents.
- Programmatically create a template. Source.
- Request a signature by email using a template. Source.
- Send an envelope and upload its documents with multipart binary transfer. Source. Binary transfer is 33% more efficient than using Base64 encoding.
- Use embedded sending. Source. Embeds the DocuSign web tool (NDSE) in your web app to finalize or update the envelope and documents before they are sent.
- Embedded DocuSign web tool (NDSE). Source.
- Use embedded signing from a template with an added document. Source. This example sends an envelope based on a template. In addition to the template's document(s), the example adds an additional document to the envelope by using the Composite Templates feature.
- Payments Example. Source. An order form, with online payment by credit card.
- Get the envelope tab data. Retrieve the tab (field) values for all of the envelope's recipients. Source.
- Set envelope tab values. The example creates an envelope and sets the initial values for its tabs (fields). Some of the tabs are set to be read-only, others can be updated by the recipient. The example also stores metadata with the envelope. Source.
- Set template tab values. The example creates an envelope using a template and sets the initial values for its tabs (fields). The example also stores metadata with the envelope. Source.
- Get the envelope custom field data (metadata). The example retrieves the custom metadata (custom data fields) stored with the envelope. Source.
- Requiring an Access Code for a Recipient
Source. This example sends an envelope using remote (email) signing requiring the recipient to enter an access code. - Send an envelope with a remote (email) signer using SMS authentication. Source. This example sends an envelope using remote (email) signing requiring the recipient to supply a verification code sent to them via SMS.
- Send an envelope with a remote (email) signer using Phone authentication. Source. This example sends an envelope using remote (email) signing requiring the recipient to supply a verification code sent to them via a phone call.
- Send an envelope with a remote (email) signer using Knowledge-Based authentication. Source. This example sends an envelope using remote (email) signing requiring the recipient to validate their identity via Knowledge-Based authentication.
- Send an envelope with a remote (email) signer using Identity Verification. Source. This example sends an envelope using remote (email) signing requiring the recipient to validate their identity via a government issued ID.
- Creating a permission profile Source. This code example demonstrates how to create a permission profile using the Create Permission Profile method.
- Setting a permission profile Source. This code example demonstrates how to set a user group’s permission profile using the Update Group method. You must have already created the permissions profile and the group of users.
- Updating individual permission settings Source. This code example demonstrates how to edit individual permission settings on a permissions profile using the Update Permission Profile method.
- Deleting a permission profile Source. This code example demonstrates how to delete a permission profile using the Delete Permission Profile method.
- Creating a brand Source. This example creates brand profile for an account using the Create Brand method.
- Applying a brand to an envelope Source. This code example demonstrates how to apply a brand you've created to an envelope using the Create Envelope method. First, creates the envelope and then applies the brand to it. Anchor text (AutoPlace) is used to position the signing fields in the documents.
- Applying a brand to a template Source. This code example demonstrates how to apply a brand you've created to a template using using the Create Envelope method. You must have already created the template and the brand. Anchor text (AutoPlace) is used to position the signing fields in the documents.
- Bulk sending envelopes to multiple recipients Source. This code example demonstrates how to send envelopes in bulk to multiple recipients using these methods: Create Bulk Send List, Create Bulk Send Request. Firstly, creates a bulk send recipients list, and then creates an envelope. After that, initiates bulk envelope sending.
- Pausing a signature workflow Source. Source. This code example demonstrates how to create an envelope where the workflow is paused before the envelope is sent to a second recipient.
- Unpausing a signature workflow Source. This code example demonstrates how to resume an envelope workflow that has been paused
- Using conditional recipients Source. This code example demonstrates how to create an envelope where the workflow is routed to different recipients based on the value of a transaction.
- Request a signature by SMS Source. This code example demonstrates how to send a signature request for a signer to read and sign via an SMS message.
For more information about the scopes used for obtaining authorization to use the Rooms API, see the Required Scopes section
Note: to use the Rooms API you must also create your DocuSign Developer Account for Rooms.
- Create room with Data. Source. This example creates a new room in your DocuSign Rooms account to be used for a transaction.
- Create a room from a template. Source. This example creates a new room using a template.
- Create room with Data. Source.) This example exports all the avialalble data from a specific room in your DocuSign Rooms account.
- Add forms to a room. Source. This example adds a standard real estate related form to a specific room in your DocuSign Rooms account.
- How to search for rooms with filters. Source. This example searches for rooms in your DocuSign Rooms account using a specific filter.
- Create an external form fillable session. Source. This example create an external form that can be filled using DocuSign for a specific room in your DocuSign Rooms account.
Note: To use the Click API include the click_manage
scope. Review the Click API 101 Auth Guide for more details.
- Create clickwraps. Source. Creates a clickwrap that you can embed in your website or app.
- Activate clickwrap. Source. Activates a new clickwrap. By default, new clickwraps are inactive. You must activate your clickwrap before you can use it.
- Clickwrap Versioning. Source. Demonstrates how to use the Click API to create a new version of a clickwrap.
- Retrieve clickwraps. Source. Demonstrates how to get a list of clickwraps associated with a specific DocuSign user.
- Get clickwrap Responses. Source. Demonstrates how to get user responses to your clickwrap agreements.
Note: If you downloaded this code using Quickstart from the DocuSign Developer Center, skip to Running the examples, the next step has been automatically performed for you. Download or clone this repository to your workstation. Open a PowerShell terminal window and navigate to this repo's folder.
- Create a DocuSign developer account if you have not yet done so.
- Once you have a DocuSign account created, make a new integration key.
- Add in the following redirect uri
http://localhost:8080/authorization-code/callback
- Find your API Account Id: on the same page you used to setup your integration key.
- Update
config/settings.json
with the credentials from DocuSign developer account:IMPERSONATION_USER_GUID
= API Account IDINTEGRATION_KEY_JWT
= Integration KeyINTEGRATION_KEY_AUTH_CODE
= Integration KeySECRET_KEY
= Secret KeyGATEWAY_ACCOUNT_ID
= Account ID
- Signer name and email: Remember to try the DocuSign signing using both a mobile phone and a regular email client.
- create an RSA KeyPair on your integration key and copy the private_key into the file
config/private.key
and save it. Use JWT authentication if you intend to run a system account integration or to impersonate a different user. - OPTIONAL: If you intend to use JWT grant authentication, set Impersonation_user_guid by using your own user_account_id found on the same page used to set your integration key.
Note: Before you can make any API calls using JWT Grant, you must get your user’s consent for your app to impersonate them. To do this, the impersonation
scope is added when requesting a JSON Web Token.
This launcher is a collection of powershell scripts with an included http listener script. The listener script works on port 8080 in order to receive the redirect callback from successful authorization with DocuSign servers that include the Authorization code or an access token in the response payload. Confirm that port 8080 is not in use by other applications so that the OAuth mechanism functions properly.
These OAuth scripts are integrated into the launcher and hardcode the location for the RSA private key in the case of the JWT php scripts.
Do not delete or change the name of the private.key file located in the config directory as this will cause problems with jwt authentication.
You can see each of the various examples in action by running powershell launcher.ps1
and pressing the number six to get to the option to edit your form data. To use the Rooms API, select Rooms API at the selection prompt just after running powershell launcher.ps1
.
Log in to your DocuSign account using either Authorization Code Grant or using JWT to gain an OAuth token. From there, you can pick the number that corresponds to a setting or feature you wish to try out.
If you make a mistake, simply run the settings option again. Each code example is a standalone file, but can be reached using the launcher.ps1 file.
Use the powershell terminal to run the examples.
The examples have been tested on Windows but can conceivably be used with MacOS and Linux systems.
The source files for each example are located in the /examples
directory.
To use the payments code example, first create a test payments gateway in your account. Follow the instructions in the PAYMENTS_INSTALLATION.md file.
Then add the payment gateway id to the code example file.
This repository uses the MIT License. See the LICENSE file for more information.
Pull requests are welcomed. Pull requests will only be considered if their content uses the MIT License.