Secrets Manager
The Secrets Manager is a Premium feature. It stores API keys, passwords, and tokens encrypted on your phone so your custom actions can use them without the values ever appearing in an action, a rule or an export in plain text.
Opening the Secrets Manager
Open the Settings tab and tap Secrets Manager. The list shows each secret's name and description. Values are never shown in the list. If you have none yet, the list reads "No secrets stored".
Adding and changing secrets
Tap Set secret to open the dialog:
| Field | Description |
|---|---|
| Name | The key you use to refer to the secret, for example API_KEY or FTP_USER. Names are matched exactly, including case. |
| Value | The secret itself. It is masked while you type; press and hold the eye icon to peek at it, and it hides again as soon as you let go. |
| Description | Optional. A note to remind you what the secret is for. Descriptions are not secret. |
Tap Save. To change a secret, tap Set secret again and enter the same name: the value and description you enter replace the old ones. To remove a secret, tap the delete icon on its row and confirm.
Secrets added by an installed plugin show "Imported secret managed by" and the plugin's name, and can't be deleted here. Delete them from the plugin instead. Removing a plugin leaves its secrets in place until you delete them.
Using secrets in actions
Refer to a secret with this syntax, using the secret's name:
{{secret:API_KEY}}
You can use it in these places:
- a webhook action's URL, path, or per-rule override URL
- header values
- body field values
- the fields of a system action
In the action editor, the Token Builder button next to each of these fields has a Secrets category listing your secrets, so you don't need to type the name. When the action runs, LemmeKnow fills in the stored value immediately before sending. Secrets are filled in before any other token, so text arriving in a notification or feed item can never name a secret and pull its value out.
Authorization = Bearer {{secret:API_KEY}}
A Custom URL may start with a secret that holds the whole scheme and host, which is useful when the address itself is private:
{{secret:BACKUP_HOST}}/api/start?job={{rule.name}}
Ad-Hoc scripts receive every secret as a variable named after its key. See Custom actions.
Where secrets are not filled in
Secrets only ever go into outgoing action requests. In every other field, such as a rule name, a message format, a filter, a quiet rule condition or a script rule, {{secret:...}} is left exactly as typed, even if you paste it there. This keeps a secret from ending up in a notification, on screen or in a log.
Secret values that shows up in text are replaced with *** before it is shown or stored. Be sure to use longer, unique secret values so matching same word text in redacted parts of the app don't accidentally expose your secret.
Secrets and backups
Secrets and server access keys stay on the phone that stored them. They are left out of Android's cloud backup and device transfer, and an encrypted copy restored onto a different phone can't be read, so you would enter them again there. To carry them to another phone, use Export Config with a passphrase.
Exporting
When you tap Export Config in Settings, LemmeKnow asks whether to encrypt your secrets with a passphrase. The passphrase must be at least 8 characters. Hold the eye icon to check what you typed.
| Choice | What the export file contains |
|---|---|
| With a passphrase | Your servers, feeds, rules, quiet rules, folders, actions, custom themes, and playlists, plus a secrets section encrypted with your passphrase. That section holds every Secrets Manager entry (name, value, and description), every server access key and username, and every action's headers and body. Those headers and bodies are taken out of the readable part of the file. |
| Without a passphrase | The same configuration with no secrets, access keys or usernames. Action headers and bodies are saved as readable text, so a {{secret:...}} reference stays as written but any value you typed directly into a header or body is visible in the file. |
On the free tier the passphrase step is skipped and the export carries no secrets.
LemmeKnow never stores or hints at your passphrase. If you lose it, the encrypted section can't be recovered.
Importing
When you import a file that has an encrypted secrets section, LemmeKnow asks for the passphrase used at export time.
- With the right passphrase, access keys, usernames, secrets, and action headers and bodies are restored, and a message tells you how many keys and secrets came back.
- Leave it blank to import only the rest. LemmeKnow then tells you how many actions came in without their headers and body; import again with the passphrase to restore them.
- With a wrong passphrase, or a damaged file, the import stops without changing anything and shows an error.
Before anything is written, LemmeKnow also asks you to confirm any server whose connection settings in the file differ from the same server on your phone, since its access key would go to the file's settings. Restore applies the file's settings and Keep current leaves that server as it is.
On the free tier, files with an encrypted section import without it.
The encrypted section
The secrets section uses a standard, documented format, so you can recover it with your passphrase in any environment that has standard encryption tools, not only in LemmeKnow:
{
"kdf": "pbkdf2-sha256",
"iters": 200000,
"salt": "<base64, 16 bytes>",
"nonce": "<base64, 12 bytes>",
"ciphertext": "<base64>"
}
To decrypt it, base64-decode salt, nonce, and ciphertext, derive a 256-bit key with PBKDF2-HMAC-SHA256 from your passphrase, the salt, and iters iterations, then decrypt the ciphertext with AES-256-GCM using that key and the nonce (the 128-bit tag is at the end of the ciphertext). The result is JSON:
{
"access_keys": { "<server id>": "<access key>" },
"usernames": { "<server id>": "<username>" },
"user_secrets": [
{ "key": "API_KEY", "value": "...", "desc": "Backups service" }
],
"action_fields": {
"<action id>": { "headers": [ ], "body": [ ] }
}
}
A wrong passphrase and a tampered file fail in exactly the same way, so treat any decryption failure as "don't trust the output". Keys that a plugin keeps in your phone's secure hardware never leave the phone and aren't part of the export.