C# SDK
Install and start using the C# SDK.
Intro
The Docusign eSignature REST API SDK provides access to the Docusign eSignature REST API REST APIs.
The Docusign eSignature REST API provides you with a powerful, convenient, and simple Web services API for interacting with Docusign.
Installation
Add the SDK as a project reference into your solution:
dotnet add reference <path-to-sdk>/DocusignESignatureRestApi.csprojQuick Start
Dependency Injection
Register the client with IServiceCollection and resolve it from the container. The HttpClient is managed by IHttpClientFactory. Configure the client's behavior through DocusignESignatureRestApiClientOptions.
services.AddDocusignESignatureRestApiClient(options =>
{
options.OAuth2 = "YOUR_BEARER_TOKEN";
options.Environment = ServerEnvironment.Production;
// TODO: configure more client options here
});Direct Instantiation
Create the client by passing an HttpClient you manage yourself. Configure the client's behavior through DocusignESignatureRestApiClientOptions.
var httpClient = new HttpClient();
// TODO: configure more client options here
var options = new DocusignESignatureRestApiClientOptions
{
OAuth2 = "YOUR_BEARER_TOKEN",
Environment = ServerEnvironment.Production,
};
var client = new DocusignESignatureRestApiClient(httpClient, options);