Ask Your Question
3

How can the GCP DocumentAI API be called from a .net service in App Engine?

asked 2023-06-21 10:58:31 +0000

devzero gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2023-06-21 11:28:02 +0000

david gravatar image

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.

edit flag offensive delete link more

Your Answer

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

Add Answer


Question Tools

Stats

Asked: 2023-06-21 10:58:31 +0000

Seen: 18 times

Last updated: Jun 21 '23