Skip to main content

After an admin has configured a secret store, you can reference secrets in integration forms using the {{sb_secrets}} object.

Referencing secrets

Secrets are accessed from their respective stores using the syntax:
Use this syntax in an integration’s configuration form, for fields such as a password, API key, or connection string. Secrets are fetched at runtime from a particular store based on the API’s current data tag.

JSON secrets

If your secret is stored as a JSON object in key:value form, use the JavaScript JSON.parse() function to reference the secret value:

Special characters

If your secret name includes spaces or special characters, use array notation instead of dot notation:

Caching

An admin can configure caching for each secret store to reduce calls to the secrets manager and improve API performance. If you’ve recently rotated a secret and aren’t seeing the new value, ask your admin to clear the cache for that secret store.