Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Here are the steps to call the GCP DocumentAI API from a .net service in App Engine:

  1. Create a new project on the Google Cloud Platform and enable the DocumentAI API.

  2. Create a service account with the appropriate permissions to call the DocumentAI API.

  3. Download the JSON file containing the service account information and store it securely in your application.

  4. Install the Google.Cloud.DocumentAI.V1 nuget package in your .net service project.

  5. 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.

  6. Create a DocumentProcessorServiceClient object to interact with the DocumentAI API. You can use this client to submit document processing requests and retrieve the results.

  7. 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.

  8. Handle the response object and extract the relevant information from it.

  9. 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.