Integrating eSignature Solution into your ASP.NET Core app using BoldSign APIs
Live Chat Icon For mobile
Live Chat Icon
Popular Categories.NET  (182).NET Core  (28).NET MAUI  (233)Angular  (117)ASP.NET  (49)ASP.NET Core  (81)ASP.NET MVC  (87)Azure  (42)Black Friday Deal  (1)Blazor  (244)BoldSign  (15)DocIO  (24)Essential JS 2  (110)Essential Studio  (201)File Formats  (74)Flutter  (140)JavaScript  (227)Microsoft  (122)PDF  (86)Python  (1)React  (107)Streamlit  (1)Succinctly series  (131)Syncfusion  (993)TypeScript  (33)Uno Platform  (3)UWP  (3)Vue  (46)Webinar  (53)Windows Forms  (59)WinUI  (72)WPF  (165)Xamarin  (159)XlsIO  (38)Other CategoriesBarcode  (5)BI  (29)Bold BI  (8)Bold Reports  (2)Build conference  (11)Business intelligence  (55)Button  (4)C#  (164)Chart  (154)Chart of the week  (62)Cloud  (16)Company  (440)Dashboard  (8)Data Science  (3)Data Validation  (8)DataGrid  (74)Development  (694)Doc  (8)DockingManager  (1)eBook  (99)Enterprise  (22)Entity Framework  (7)Essential Tools  (13)Excel  (43)Extensions  (31)File Manager  (8)Gantt  (23)Gauge  (12)Git  (5)Grid  (31)HTML  (13)Installer  (2)Knockout  (2)Language  (1)LINQPad  (1)Linux  (2)M-Commerce  (1)Metro Studio  (11)Mobile  (530)Mobile MVC  (9)OLAP server  (2)Open source  (1)Orubase  (12)Partners  (21)PDF viewer  (48)Performance  (13)PHP  (2)PivotGrid  (5)Predictive Analytics  (6)Report Server  (3)Reporting  (8)Reporting / Back Office  (9)Rich Text Editor  (12)Road Map  (12)Scheduler  (54)Security  (5)SfDataGrid  (9)Silverlight  (21)Sneak Peek  (32)Solution Services  (4)Spreadsheet  (11)SQL  (15)Stock Chart  (1)Surface  (4)Tablets  (5)Theme  (12)Tips and Tricks  (112)UI  (426)Uncategorized  (68)Unix  (2)User interface  (68)Visual State Manager  (2)Visual Studio  (31)Visual Studio Code  (19)Web  (648)What's new  (354)Windows 8  (19)Windows App  (2)Windows Phone  (15)Windows Phone 7  (9)WinRT  (26)
Banner image of eSignature APIs in ASP.NET core blog

Integrating eSignature Solution into your ASP.NET Core app using BoldSign APIs

BoldSign is an enterprise-grade electronic signature application and API that enables users to sign documents digitally and allows you to send documents for eSignatures from its app or within your app. Its eSignature APIs give you complete control over documents and properties. You can send documents for signature, track document status with webhooks, download signed documents and audit trails, remind signers to complete the signing process, and much more.

This blog post will teach you how to integrate BoldSign using its eSignature APIs in ASP.NET Core web application!

Getting started

Note: Refer to the Getting Started with BoldSign documentation before proceeding.

  1. Sign up for a free sandbox.
  2. Create an ASP.NET Core web app using the following command:
    dotnet new webapp --framework "netcoreapp3.1" -o ASPCoreEsignApp
  3. Install the BoldSign API NuGet package with the following command:
    dotnet add package BoldSign.Api
  4. Acquire the necessary BoldSign app credentials.

Add BoldSign services through dependency injection

To communicate with the BoldSign API, you need to add authentication details such as headers and a base path to the HttpClient.

Include the following code in the ConfigureServices() method in your startup.cs file.

var apiClient = new ApiClient("https://api.boldsign.com/", "***API Key***");
services.AddSingleton(apiClient);
services.AddSingleton(new DocumentClient(apiClient));
services.AddSingleton(new TemplateClient(apiClient));

Now you can start using the BoldSign APIs in your app.

Send a document for signing

Using the following code in your ASP.NET Core app, you can initiate the signing process. Send a request to sign a document to one or more recipients with the signing workflow, auto-reminders, expiration date, and more.

Refer to the following code example.

private readonly IDocumentClient documentClient;
private readonly ITemplateClient templateClient;
 
public IndexModel(IDocumentClient documentClient, ITemplateClient templateClient, ILogger logger)
{
  this.documentClient = documentClient;
  this.templateClient = templateClient;
}
 
public void SignDocument()
{
 
  // Read the document from local path as stream.
  using var fileStream = System.IO.File.OpenRead("doc-2.pdf");
  var documentStream = new DocumentFileStream
  {
    ContentType = "application/pdf",
    FileData = fileStream,
    FileName = "doc-2.pdf",
  };
 
 
  // Creating collection with the loaded document.
  var filesToUpload = new List<IDocumentFile>
  {
    documentStream,
  };
 
  // Creating signature field.
  var signatureField = new FormField(
  id: "Sign",
  type: FieldType.Signature,
  pageNumber: 1,
  isRequired: true,
  bounds: new Rectangle(x: 50, y: 50, width: 200, height: 30));
 
  // Adding the field to the collection.
  List<FormField> formFeilds = new List<FormField>();
  formFeilds.Add(signatureField);
 
  // Creating signer field.
  var signer = new DocumentSigner(
    name: "Signer Name 1",
    emailAddress: "signer@cubeflakes.com",
    signerOrder: 1,
    authenticationCode: "851321",
    signerType: SignerType.Signer,
    privateMessage: "This is private message for signer",
    // Assign the created form fields to the signer.
    formFields: formFeilds);
 
  // Adding the signer to the collection.
  var documentSigners = new List<DocumentSigner>
  {
    signer
  };
 
  // Create send for sign request object.
  var sendForSign = new SendForSign
  {
    Title = "Sent from API SDK",
    Message = "This is document message sent from API SDK",
    EnableSigningOrder = false,
 
  // Assign the signers collection.
  Signers = documentSigners,
 
  // Assign the loaded files collection.
  Files = filesToUpload
  };
 
  // Send the document for signing.
  var createdDocumentResult = this.documentClient.SendDocument(sendForSign);
}

Note: For more details, refer to the send document for signing using BoldSign documentation.

Send a document using a template

Also, you can send documents for signing with predefined templates. Templates help users save time when they need to repeatedly send the same contracts for signing to different sets of people. Once we set up a template, sending documents takes less than a minute.

First, create a template in the BoldSign app and then get the template ID by following these steps:

  1. Navigate to the My Templates section in the BoldSign app. You can see the created templates in the list.
  2. Click the more options button at the right end of the template you want to send and choose the Copy template ID option to copy the template’s ID.
    Choose the Copy template ID option
  3. Use the copied template ID to send your document for signing. You can directly use the template with a predefined set of recipients or add the recipients to the document before sending the signature request. Refer to the following code example.
    public void SendDocumentUsingTemplate()
    {
     
      var templateDetails = new SendForSignFromTemplate(
      templateId: "**templateId**",
      title: "Document from Template",
      message: "This document description");
      var createdDocumentResult = this.templateClient.SendUsingTemplate(templateDetails);
    }

    Refer to the following images.

    Sending a PDF Document for Signing Using BoldSign
    Sending a PDF Document for Signing Using BoldSign

    Signing a PDF Document using BoldSign Web App
    Signing a PDF Document using BoldSign Web App

Note: For more details, refer to the send document to sign using templates in BoldSign documentation.

Conclusion

Thanks for reading about how to integrate BoldSign using its eSignature APIs into your ASP.NET Core web application! Check out our online demo and enjoy a hassle-free signing experience.

The Syncfusion ASP.NET Core UI controls library, powered by Essential JS 2, is the only control suite you will ever need to build an app. It contains over 70 high-performance, lightweight, modular, and responsive UI controls in a single package. Use them to increase your productivity in your development projects!

You can download the product setup if you’re a current customer. If you’re not a Syncfusion customer, you can download a free 30-day trial to evaluate our products.

You can contact us through our support forumsupport portal, or feedback portal. As always, we are happy to assist you!

Related blogs

Tags:

Share this post:

Popular Now

Be the first to get updates

Subscribe RSS feed

Be the first to get updates

Subscribe RSS feed