How to create a proxy to consume 3rd party with API Key

32 Views Asked by At

I need to create and make available internally, an API proxy, which must consume a third-party service. The third-party service requires an API Key. How can I consume this third-party service, passing the API Key, and returning the information from the third-party service to my internal consumers?

I would like to know the step-by-step instructions for creating this type of proxy. Basically I thought about consuming the third-party service, and providing a friendly endpoint, with the standards of the company I work for, for my internal consumers.

1

There are 1 best solutions below

0
evansche On

This task should really be a “left as an exercise for the reader“, following your brief review of the Apigee documentation and all of their examples included therein. In basic terms you want to deploy a proxy, whose target-endpoint is the external third-party API you ultimately want to consume. The API key you intend to include is a request variable, which in your proxy’s policies you can pull from an encrypted keystore, resident also with your local Apigee environment. See:

  1. https://cloud.google.com/apigee/docs/api-platform/fundamentals/understanding-handling-request-response-data
  2. https://cloud.google.com/apigee/docs/api-platform/reference/policies/key-value-map-operations-policy
  3. https://youtu.be/l1OqKOlSqo8?si=f9_ZQs8ag8NJ_fb3