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
Creating the Credential
- Navigate to the Credentials section of the manage platform.
- Click the + Create new itembutton.
- Select Generic Body from the credential type dropdown.
- Enter a Credential Name.
- Enter the JSON object in the Secret Body editor.
- Click the Createbutton.
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).
The API Call task returns an error instead of making the request when a Generic Body credential is used with:
- a
GETorHEADrequest - a
multipart/form-dataor binary body - a body that is a string instead of an object
See the Generic Body Org Credential example on the API Call page.