Using the authType setting in variables (in the top-level processor group), you can set your authorization method.

When to Use Key or JWT Authorization

Use the authType of key when:

  • You need to make a call from Postman or curl.
  • You want to use the HTTP/REST connector in Lingk recipes
  • You need to make call from an external system other than the Lingk recipe engines

Use the authType of jwt when:

  • Using the LingkAdapter reader and writer connector in Lingk recipes
  • You want to take advantage of the strongest security mechanism
  • You want out of the box environment support in the Lingk app

Configuring Security in the API Plugin

Both types of authorization requires that you first enter in client id and client secret into your API Plugin instance. To do so:

  1. Double-click on the top-level processor group for your API. 
  2. Find the "API Credentials" processor and stop it.
  3. Double-click on the "API Credentials" processor. 
  4. Click the "Properties" tab
  5. Click the "+" button to add new key and secret. 
    1. The values for the LingkAdapter connectors (jwt authType) comes from the Workspace Environment configuration in the Lingk app.
    2. The values for HTTP/REST connectors (key authType) can be generated using whatever means you wish.
  6. Click "Apply"
  7. Start the "API Credentials" processor.

Calling an API with Key-based Authorization

When you added your new key and secret to your API plugin instance, you specified the information that will be used to validate inbound API requests.

To make an API call with key-based authorization follow these parameters:

  1. Add an Authorization header to your request
    1. Bearer [TheValueFromAPIPluginAuthentication]
  2. Add a X-Lingk-Context header to your request
    1. [TheKeyFromAPIPluginAuthentication]
  3. Add a Content-Type
    1. application/json