BILLING_API_KEY, and the tool sends Bearer {{secrets.BILLING_API_KEY}}. The key itself never appears in the tool, and when you rotate it, every tool that uses it picks up the new value.
Secrets are for custom tools only. To connect a tool Decimal already integrates with, like Zendesk, GitHub, or Stripe, use its page in Settings → Integrations. Credentials entered there belong to that integration and don’t appear in Secrets. The integrations list has the full catalog.
How secrets work
- Tools reference a secret by key, not by value. A tool’s URL, headers, or JSON body can include
{{secrets.KEY}}. Decimal swaps in the value server-side on every request. - Values are write-only. After you save a secret, Decimal never shows the value again. If you’ve lost the original, generate a new one in the third-party tool and rotate it in.
- Agents never see the value. Secret values are masked in test results and stripped from API responses before an agent reads them.
- OAuth tokens are handled for you. For an OAuth secret, Decimal exchanges the client ID and secret for an access token, refreshes it before it expires, and retries once with a fresh token if an API returns
401. - Old secrets are flagged. A secret whose value hasn’t changed in 90 days is marked in the list so you know it’s due for rotation.
Create a secret
1. Open Secrets Go to Settings → Secrets and click New secret. 2. Choose a type and fill in the details- Value
- OAuth client credentials
Use this for a static API key, token, or password.
- Key (required) - the name tools use to reference the secret, for example
BILLING_API_KEY. Uppercase letters, numbers, and underscores, starting with a letter. Decimal uppercases what you type. - Value (required) - paste the credential.
- Description (optional) - “What this secret is for”. Note where the credential came from and who owns it, so the next admin knows where to rotate it.
auth.example.com · 401 invalid_client.
Creating a secret with a key that already exists replaces that secret’s value. Tools using the key switch to the new value on their next call.
Use a secret in a custom tool
In a custom tool’s URL, headers, or JSON body, type{{ and pick the secret from the list, or write the reference yourself:
{{secrets.KEY}} resolves to the current access token, not the client secret. Put it in the Authorization header with the Bearer prefix.
If a tool references a key that doesn’t exist, the editor shows Add KEY in Secrets, and runs fail with “The secret KEY doesn’t exist. Add it in Settings, Secrets.”
Rotate a secret
Open the menu at the end of the secret’s row.- Value secret - click Rotate value, paste the new value, and click Save.
- OAuth secret - click Edit secret and paste the new Client secret. The field shows “Unchanged”; leave it blank to keep the stored secret while you edit other fields.
- Create the new credential in the third-party tool, leaving the old one active.
- Rotate it in Decimal.
- Test a custom tool that uses the secret.
- Revoke the old credential in the third-party tool.
When to rotate
We recommend rotating each secret at least every 90 days, and right away if the value may have been exposed or someone who had it leaves your team. Decimal tracks the 90 days for you. Once a secret’s value is older than that, its row gets an Unchanged badge with the number of days (hover for the date it last changed), and a banner above the list counts how many secrets are overdue. Select Over 90 days in the banner to filter the list to just those. Only a new value resets the count. For an OAuth secret, that means a new client secret: editing the scope or audience, or refreshing the access token, doesn’t count as a rotation. If your security policy sets a shorter window, rotate on that schedule. The badge still appears only at 90 days.OAuth access tokens
Each OAuth secret’s row shows when its current access token expires, for example “Access token expires in 58m”. Decimal refreshes the token shortly before that, so you don’t need to do anything while it’s working. When Decimal can’t get a token, the row shows Couldn’t get access token in red, with when it last failed. The most common cause is a client secret that expired or was revoked in the third-party tool: generate a new one and paste it into Edit secret. To check a fix, or to pick up permission changes made in the third-party tool, click Refresh access token in the row’s menu. Decimal requests a new token immediately.Delete a secret
Click Delete secret in the row’s menu and confirm. Tools that reference the key fail until you create a secret with the same key. This can’t be undone.Gotchas and troubleshooting
Saving an OAuth secret fails with "Couldn't get an access token"
Saving an OAuth secret fails with "Couldn't get an access token"
Decimal tests the credentials before saving them. Check the client ID and secret first. If they’re right, try a different Send credentials as option: providers disagree on whether credentials go in a JSON body, a form body, or a Basic auth header. A
400 invalid_scope or access_denied means the Scope or Audience doesn’t match what the client is allowed to request."can't be reached from Decimal"
"can't be reached from Decimal"
The token URL resolves to a private network address, which Decimal won’t call. Use the provider’s public token endpoint.
HTTPS is required for token URLs
HTTPS is required for token URLs
The Token URL must start with
https://. Plain http:// endpoints are rejected.A tool call fails with 401
A tool call fails with 401
For a value secret, the stored value is wrong or was revoked: rotate it. For an OAuth secret, Decimal already retried with a fresh token, so check the row for Couldn’t get access token and confirm the API accepts tokens from that client.
A tool call fails with 403
A tool call fails with 403
The credential works but doesn’t have permission for that request. Grant the permission or scope in the third-party tool. For an OAuth secret, click Refresh access token afterwards so the new token carries it.
Secrets can be replaced but never viewed
Secrets can be replaced but never viewed
There is no way to reveal a stored value. If you’ve lost the original, generate a new one in the third-party tool and rotate it in.