Here are the steps to call the GCP DocumentAI API from a .net service in App Engine:
Create a new project on the Google Cloud Platform and enable the DocumentAI API.
Create a service account with the appropriate permissions to call the DocumentAI API.
Download the JSON file containing the service account information and store it securely in your application.
Install the Google.Cloud.DocumentAI.V1 nuget package in your .net service project.
Authenticate with the DocumentAI API using the service account credentials. You can use the GoogleCredential.FromFile method to create a credential object from the JSON file.
Create a DocumentProcessorServiceClient object to interact with the DocumentAI API. You can use this client to submit document processing requests and retrieve the results.
Use the client object to call the relevant methods of the DocumentAI API, such as ProcessDocumentAsync, which takes in a request object and returns a response object.
Handle the response object and extract the relevant information from it.
Deploy the .net service to App Engine and ensure that it is configured to use the service account credentials.
By following these steps, you should be able to call the GCP DocumentAI API from a .net service in App Engine.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2023-06-21 10:58:31 +0000
Seen: 18 times
Last updated: Jun 21 '23
Is it possible to globally install System.Data.OleDb?
What is the method to discover and terminate a process in .net?
Does Asp .Net Core Identity log out automatically after a certain period of time?
Why isn't the user interface updating when adding a custom object with data binding in .NET MAUI?
How can an application communicate with a service in the C# .NET Framework?
How can I send messages to multiple phone numbers using Twilio SMS and .net?
What is the process for working with dynamics 365 using .net 6/7?