Welcome to the Embedded Sending Sample App! This application showcases Docusign embedded sending features designed for various use cases. Built using Node.js and React, Embedded Sending allows you to seamlessly integrate document signing workflows into your processes, enhancing efficiency and user experience across multiple scenarios.
Before you can run this sample app on your local machine, you must first create a new integration key in your Docusign developer account.
- If you don't already have one, create a free developer account.
- Log in to your developer account and navigate to My Apps & Keys.
- Select Add App and Integration Key.
- Create a new integration that is configured to use JSON Web Token (JWT) Grant and Authorization Code Grant (ACG). You will need the integration key itself and its RSA key pair.
- Save the integration key and private RSA key pair somewhere safe as you will need these later.
- Add redirect URIs for your app (used in
ACG_CALLBACK_URL_DEV
.env variable) - you can specify both:
http://localhost:3000
(if you run the app locally)http://localhost:80
(if you run the app in Docker)
See our video, Creating an Integration Key for JWT Authentication for a demonstration of how to create an integration key (client ID) for a user application like this example.
- A free Docusign developer account.
- Integration key and corresponding RSA key pair from the integration you created above.
- Node.js v20+
- VS Code
- Docker
- Download or clone this repository to your workstation in a new folder named sample-app-embeddedsending-node.
- Navigate to that folder:
cd sample-app-embeddedsending-node
- Navigate to the client folder:
cd client
- Install dependencies using the npm package manager:
npm install
- Navigate to the server folder:
cd ../server
- Install dependencies:
npm install
- Connect your integration, see the next section
- Rename the .env.example file in the root directory to .env, and update the followig required variables in the file:
DS_CLIENT_ID
- an Integration key of your app (UUID). Located on the "Apps and Keys" pageDS_CLIENT_SECRET
- ID of a secret key for your application (UUID)JWT_USER_ID
- a UUID unique to each user's Docusign Account, located on the "Apps and Keys" page under "My Account Information" section.
Note: Protect your integration key and client secret. You should make sure that the .env file will not be stored in your source code repository.
- Rename the example_private.key file to private.key, and paste your complete private RSA key into this file (including the header and footer of the key). This should be the private RSA you should have gotten when you created your Docusign account.
- Navigate to the application folder:
cd sample-app-embeddedsending-node
- To start the server and client at the same time:
npm run concurrently:dev
- Or, to run the server and client separately:
- In one terminal, run
npm run client:dev
- In a separate terminal, run
npm run server:dev
- In one terminal, run
- Open a browser to http://localhost:3000
You can run the application in Docker locally in production mode:
- Navigate to the application folder:
cd sample-app-embeddedsending-node
- Make sure that you configured .env file and saved your private.key in the root of the folder, as described in the section above
- Make sure that you have Docker installed and Docker engine is running
- Run
docker compose -f docker-compose.local.yaml up -d
- To stop containers, run
docker compose -f docker-compose.local.yaml down
- Open a browser to http://localhost:80