1. Credentials
  2. Generic Body

Credentials

Generic Body

Explains how to create a Generic Body credential for storing a secret JSON object. Used to merge secret values into the body of an API call without exposing them in the template.

Overview

The Generic Body credential stores a JSON object instead of a single string. It is useful for APIs that expect secrets in the request body rather than in a header, for example a client_secret or an api_key field.

When used in the API Call task, the object is deep-merged into the request body. The credential's values win when a key exists in both the body and the credential. The merged values are never returned in the task result, so they stay hidden from the stub and stubpost.

Anywhere else a Generic credential's value can be used, a Generic Body credential gives the whole object instead of a string.

Fields

Field Required Description
Credential Name Yes A name to identify this credential.
Secret Body Yes The JSON object to store. It must be an object, not an array or a single value.

Creating the Credential

  1. Navigate to the Credentials section of the manage platform.
  2. Click the
    + Create new item
    button.
  3. Select Generic Body from the credential type dropdown.
  4. Enter a Credential Name.
  5. Enter the JSON object in the Secret Body editor.
  6. Click the
    Create
    button.

Using it in an API Call

A Generic Body credential is merged into bodies sent as JSON (application/json), form URL encoded (application/x-www-form-urlencoded) or XML (application/xml, text/xml).

WARNING

The API Call task returns an error instead of making the request when a Generic Body credential is used with:

  • a GET or HEAD request
  • a multipart/form-data or binary body
  • a body that is a string instead of an object

See the Generic Body Org Credential example on the API Call page.