How to use the User Defined credential type


Note: This article applies to the web services data actions integration.

When you add the web services data actions integration, you can select a credential type: Basic Auth, User Defined, or User Defined (OAuth). For more information, see Add a data actions integration and Credential types.

This article explains how to use the User Defined credential type. 

  1. When you add the integration, configure the User Defined credentials.

    Add field names for the API that you are using and values for those field names.

    Configure Credentials for User Defined

  2. Use field names from your credentials in the requests of all custom actions that you create. 

    The following example is a request for a custom action called Get Weather. credentials is a static keyword, which you can use with other Velocity macros. API_Key is the field name that added to the credential configuration.

    Although the integration redacts the values of field names, the actual values appear in your web service. For example, if the value for API_Key is 12345, then when the action executes, the requestUrlTemplate that you see in your web service is “https://api.openweathermap.org/data/2.5/weather?q=London&APPID=12345”. For more information, see Create a custom action, Add configuration to custom actions, and Request configuration.

    {
      "requestUrlTemplate": "https://api.openweathermap.org/data/2.5/weather?q=London&APPID=${credentials.API_Key}",
      "requestType": "GET",
      "headers": {},
      "requestTemplate": "${input.rawRequest}"
    }
    Note: When you test a custom action, the integration redacts any authorization information. For more information, see Test a custom action.

For more information about the integration, see About the web services data actions integration.