Docusign code example launchers
To quickly authenticate and send your first envelope, use the Quickstart guide: one auth flow and one example, ready to copy and paste.
Docusign code launchers are open-source GitHub projects that let you explore, run, and test code examples from our How-to guides in a specific programming language. You can use them to learn how Docusign APIs work and as a starting point for building your own integrations. This topic explains how to use code launchers and what they include.
What is a code launcher?
Docusign code launchers are template applications available in eight languages: Bash, C#, Java, Node.js, PHP, PowerShell, Python, and Ruby.
Each launcher provides a web UI or CLI for running and exploring code examples for supported Docusign APIs. The examples correspond to our How-to guides and demonstrate common tasks, such as sending an envelope for signature or creating an envelope from a template.
Supported code examples by API
Not every code example is available in every language. Each API’s How-to guides overview below lists its code examples and the languages each one supports.
- eSignature REST API
- Agreement Manager API
- Workflow Builder API
- Workspaces API
- Connected Fields API
- Web Forms API
- Monitor API
- Docusign Admin API
- ID Evidence API
- Click API
- Rooms API
- Notary API
Code launchers support two OAuth grant types: Authorization Code Grant and JSON Web Token (JWT) Grant. Each launcher implements both grant types, allowing you to explore and run the examples using either authentication method without implementing the OAuth flow yourself.
Prerequisites
- A free Docusign developer account; create one if you don’t already have one.
- Create and configure an integration key. When you configure it, add the redirect URI for your selected code launcher. Each language tab below lists its redirect URI.
- Gather the following values to configure authentication in your selected code launcher:
- Integration key
- Secret key: Required for the Authorization Code Grant.
- Private RSA key: Required for JWT authentication.
- User ID
- API Account ID
Configuration and setup
Bash
C#
Java
Node.js
PHP
Powershell
Python
Ruby
Technical requirements
- For Authorization Code Grant authentication, PHP 8.0 or later is required. For JWT Grant authentication, PHP 8.0 or later and Python 3 are required.
- Visual Studio Code, macOS Terminal, or Linux shell.
- PHP cURL tool
- Download dos2unix
Configuration
- Download or clone the Bash GitHub project.
- Make sure your integration key includes this redirect URI:
http://localhost:8080/authorization-code/callback - In
config/settings.txt, add your integration key, user ID, and API account ID. For Authorization Code Grant, also add your secret key. For JWT Grant, also add your private RSA key.
See README for more detailed setup instructions.
Running the code launcher
Run in Git Bash:
Additional configuration: Docusign payments
To use the payments code example in the launcher, first create a test payment gateway on the Payments page in your developer account. See Configure a payment gateway for details.
Once you’ve created a payment gateway, save the Gateway Account ID GUID to config/settings.txt.