The Workspaces Sample App is a Single Page Application (SPA) built with React.js (frontend) and .NET 8.0 Web API (backend). It demonstrates practical examples of building Workspaces as an in-product integration using the Docusign C# eSignature SDK.
A live instance of the application is available at: https://workspaces.sampleapps.docusign.com/
This application demonstrates the following Docusign use cases:
- Authentication — Authorization Code Grant (ACG)
- Dynamically create transactional spaces — Workspace creation, Workspace envelope creation, document upload request
- Persistent workspaces — Workspace lookup, envelope creation, document upload
Before building or running the application, ensure the following are installed and configured:
| Requirement | Notes |
|---|---|
| Node.js | Required to build the React frontend |
| .NET 8.0 SDK | Required to build and run the backend API |
| Docker | Required only for containerized deployment |
| Docusign Developer Account | Sign up here |
- Log in to your Docusign Developer Account and navigate to the Apps and Keys page.
- Create a new application and note down the Integration Key.
- Add the following Redirect URIs for your app:
{PROTOCOL}://{DOMAIN}{PROTOCOL}://{DOMAIN}/admin{PROTOCOL}://{DOMAIN}/api/consentcallback
- Click ADD SECRET KEY and save the generated key — this is your
{SecretKey}. - Click GENERATE RSA and save both the public and private key — the private key will be stored as
private.key.
Copy the example config file and fill in your values:
cp DocuSign.Workspaces/DocuSign.Workspaces/appsettings-example.json DocuSign.Workspaces/DocuSign.Workspaces/appsettings.jsonEdit appsettings.json and replace the following placeholders:
| Placeholder | Description |
|---|---|
{ClientAppUrl} |
URL of the React frontend (e.g. http://localhost:3000) |
{IntegrationKey} |
The Integration Key (GUID) from your Docusign app |
{SecretKey} |
The secret key generated in the Docusign Apps and Keys page |
{SecretKeyProd} |
Secret key for the production Docusign app — not required for local development |
{RedirectBaseUrl} |
Internal redirection URL used for consent and embedded signing (e.g. http://localhost:3000) |
{EventNotificationBaseUrl} |
Public base URL used by the Docusign Events webhook (e.g. http://localhost:5000) |
{AuthBasePath} |
Base authentication URL (e.g. https://account-d.docusign.com) |
{BaseUri} |
Base API URL for test account API calls (e.g. https://demo.docusign.net) |
{UserId} |
ID of the test user |
{AccountId} |
ID of the account connected to the test user |
{Login} |
Hardcoded login used in Use Case 3 (Customer Profile) |
{Password} |
Hardcoded password used in Use Case 3 (Customer Profile) |
Save the RSA private key generated during Docusign app setup to:
sample-app-workspaces-csharp/DocuSign.Workspaces/DocuSign.Workspaces/private.key
Follow these steps to run the application locally:
git clone https://github.com/docusign/sample-app-workspaces-csharp.git
cd sample-app-workspaces-csharpComplete the Configuration steps above before proceeding.
Navigate to the React client app folder and install Node packages:
cd DocuSign.Workspaces/DocuSign.Workspaces/ClientApp/
npm installnpm startLeave this terminal running. The React dev server will start on its default port.
Open a new terminal and navigate to the solution root:
cd DocuSign.Workspaces
dotnet build --configuration Debugdotnet run --project ./DocuSign.Workspaces/DocuSign.Workspaces.csproj --configuration DebugOpen a browser and go to:
https://localhost:3000
sample-app-workspaces-csharp/
├── .github/workflows/ # CI/CD workflows
├── DocuSign.Workspaces/ # Solution directory
│ ├── DocuSign.Workspaces/ # Main project directory
│ │ ├── ClientApp/ # React.js frontend (SPA)
│ │ ├── appsettings-example.json
│ │ ├── appsettings.json # Your local config (not committed)
│ │ └── private.key # Your RSA private key (not committed)
│ └── DocuSign.Workspaces.sln
├── .gitignore
├── LICENSE
├── README.md
└── package-lock.json
| Layer | Technology |
|---|---|
| Frontend | React.js, SCSS |
| Backend | .NET 8.0 Web API, C# |
| Auth | Docusign JWT Grant / ACG |
| SDK | Docusign C# eSignature SDK |
| Containerization | Docker |
- Docusign Developer Center
- JWT Grant Authentication
- Authorization Code Grant
- eSignature REST API Reference
This project is licensed under the MIT License.