Timill Platform Documentation

Secrets

Credentials your scripts can read without hard-coding them.

Secrets are a secure way to store sensitive values (API keys, tokens, passwords) that scripts can reference without exposing the raw value. (Secrets must be enabled on the instance.)

Secrets are readable only from JavaScript backend scripts, via secrets.get(key) — scripted widgets (Gonja) and scripted charts cannot read them.

Adding a secret#

Create a secret by specifying a key name and its value. The value is encrypted at rest and is never displayed in the UI again after you save it.

Using secrets in scripts#

Reference a secret by its key name: secrets.get("API_KEY"). The runtime injects the decrypted value only at execution time, keeping credentials out of your source code.

A group-level secret is resolved first; if no secret with that key exists at the group level, the same key is looked up at the instance level instead (managed by an instance admin, instance-wide). If neither has it, secrets.get() returns null — a script should check for that rather than assuming the key exists.

Secret values are never written to the platform’s own logs. If a script passes a secret’s value to log(), that appears in the execution history — avoid logging secret values.

Updating and deleting#

You can update a secret’s value or delete it from the secrets page. The key name is fixed once created; an updated value takes effect the next time a script that uses it runs.

Tips#

  • Use a clear, stable key name — scripts reference secrets by key, so renaming would mean editing every script.
  • Before deleting a secret, make sure no active script depends on it.
  • If a group secret and an instance secret share a key, the group’s value wins for scripts in that group — use this to override an instance-wide default for one group.