Jump to a Section
  • Introduction

    This walk-through demonstrates how to add an HTTP Authorization header to the unauthenticated endpoint in our previous Flow. Adding the Authorization header enables you to invoke an API endpoint that is protected by HTTP Basic Authentication.

    If you are familiar with API gateways, you can protect the API with basic authentication and test. For the purposes of this Flow, however, setting up an API gateway is out of scope. Because the Amazon PetStore API ignores the Authorization header, you can still work through this tutorial without setting up an API gateway and use the unauthenticated endpoint.

    Prerequisite: This tutorial builds on the Petstore Flow that you created the Call an unauthenticated API tutorial. Be sure that your previous Flow is working correctly.

    1. In the Admin Console, go to Workflow > Workflows console.
    2. At the top navigation bar, select Settings.
    3. Under Connections for the HTTP PetStore connection that you just created, click the Reauthorize icon.
    4. Change Auth Type to Basic.
    5. For username, enter admin; for password, enter secret.
      Note: Because the actual API is not authenticated, the values don’t matter.
    6. To apply the modifications to the connection settings, click Reauthorize.
  • Reauthorize HTTP Connection

  • Test the flow

    1. In Postman, copy the URL and then paste it into the Flow Test window.
    2. Enter your parameters:
    3. Click Test.
    4. In the executed Flow, check your outputs. Verify that the body matches the details from Postman.