NotifyHookDocs
Configuring rules

Secrets & headers

Keep API tokens and passwords out of literal rule text. Store them once in the encrypted vault and reference them in payloads and headers.

The secrets vault#

Secrets are named values stored in an encrypted vault on your phone. The vault uses an AES-256 key held in the Android Keystore. Open it from Settings → Security → Secrets, or add one from the SECRETS section at the bottom of the rule editor.

  • The vault is shared by all rules. Add a token once and use it in as many rules as you like.
  • Reference a secret as {{secrets.NAME}} in the JSON template or in a header value. In the rule editor, tap a secret's chip to insert it.
  • Values are never shown again after saving. You can Replace or delete a secret, but you can't read it back.
  • Use names made of letters, digits, _ and ., such as HA_TOKEN or slack.prod. Other characters can't be referenced.
Deleting a secret

Any rule that references a deleted secret sends an empty value in its place until you add a secret with the same name again.

Custom headers#

Tap Add header in the rule editor and enter each header as one Name: Value line. Values can use variables and secrets; credential headers have the additional restrictions below. Values are substituted without JSON escaping or URL encoding. Keep them single-line and ASCII: newlines and unsupported header characters cause an invalid-request failure.

Examples
Authorization: Bearer {{secrets.HA_TOKEN}}
X-Api-Key: {{secrets.MY_API_KEY}}
X-Source-App: {{packageName}}

NotifyHook always sets Content-Type and User-Agent. See Request format.

Credential headers are protected#

A header counts as a credential header if its name contains any of: authorization, auth, token, api_key, apikey, api-key, secret, password, passwd, pwd, access_token, refresh_token, client_secret, signature or cookie. The match ignores case. For these headers:

  • If you type a literal value, such as Bearer abc123, NotifyHook moves it into the vault when you save. It becomes an auto-named secret like {{secrets.header_3f9c…}}, so the plain value is never stored in the rule.
  • If you use a reference, the value must be a single vault reference, optionally prefixed with Bearer or Basic. Mixing text and placeholders, as in token-{{secrets.A}}-{{title}}, is rejected with "Credential headers must use a single vault reference, optionally prefixed with Bearer or Basic".
Basic auth

Store the already-encoded base64(user:password) string as a secret, then use Authorization: Basic {{secrets.BASIC_CREDS}}.

HMAC signing secret#

The HMAC SHA-256 signing secret is separate from the vault. Each rule has its own, stored encrypted in the same way. It is used to sign each request body. See Verifying signatures.

What the event log shows#

Credential redaction is applied before event records are stored:

  • {{secrets.*}} values in the stored payload are replaced with a redaction marker.
  • Credential header values and the signature are redacted.
  • JSON fields whose key looks like a credential, such as "token", "password" or "auth", are redacted, and so are Bearer … and Basic … strings.
  • Known secret values that show up in your server's error response are also scrubbed.

This only affects the log. Your server always receives the real values.

Redaction is not a guarantee that arbitrary text is safe to share. Notification content, literal secrets outside the vault, or unfamiliar credential formats may remain. Review payloads, response bodies, screenshots and Diagnostics before sharing them.

Why is my "author" field redacted in the log?

The log redacts conservatively. Any key that contains a credential word, such as author (which contains "auth"), shows as [REDACTED] in the log. The request itself is unchanged.

What is not a secret#

The webhook URL, JSON template and non-credential header text are stored as ordinary rule data, not in the encrypted vault. URLs are shown in the app and included in rule exports. If your service puts a token in the URL, as Discord and Slack webhook URLs do, treat exports as sensitive and review them before sharing. Use vault references in bodies and headers when the service allows it. The rule editor currently requires a literal, valid HTTPS URL; it rejects unexpanded {{…}} placeholders there.

Save before testing any newly entered literal credential header so it is moved into the vault, and save HMAC changes so the test uses the new stored key. Rotating a named secret under the same name changes all rules and pending retries that reference it. Replacing a literal URL or changing a reference to a different secret name affects new deliveries only.