This article explains how to unprotect a Word document with NET REST API. You will develop an application that can automatically unprotect Word file with C# Low Code API using the .NET cloud SDK. We will discuss various options to customize the process according to your application needs.
Prerequisite
- Create an account and get API credentials
- Download Aspose.Words Cloud SDK for Dotnet to unprotect a Word file
- Setup C# solution project with the above SDK for removing the protection of a Word file
Steps to Convert Protected Word Document to Unprotected with C# Low Code API
- Create an object of the WordsApi class by passing the Client ID and secret to unprotect a Word file
- Instantiate the UnprotectDocumentOnlineRequest object by setting the input Word file data and output file name
- Send the request using the UnprotectDocumentOnline() method
- Wait for the response and get the output document for saving on the disk
The above-mentioned steps describe the process to unprotect Word DOC with C# REST API. Create a WordsApi class object followed by declaring and initializing the UnprotectDocumentOnlineRequest object with the protected Word file data and the destination file name. Call the UnprotectDocumentOnline method providing the above configurations and extract the unprotected Word file from the response returned by the API call.
Code to Unprotect a Word Document for Editing with C# REST API
This code demonstrates how to unprotect DOCX with NET REST API. The UnprotectDocumentOnlineRequest class has multiple parameters such as LoadEncoding, Password, and EncryptedPassword that can be used if required. There is no need to download the output file immediately as you may perform further operations online and finally get the output file from the cloud.
This article has taught us the process to convert protected Word document to unprotected online with C# Low Code API. To apply the protection to a Word file, refer to the following article: Add Password to Word Document with NET REST API.