Skip to content

8.1What a secret is and when to use one

A secret is a named, encrypted value, such as a password, a token or an API key. Your team stores it once. After that, monitors use it by name.

To use a secret, you write a reference in the monitor: the secret's name inside ${ and }, such as ${PROD_API_TOKEN}. When the check runs, the reference is replaced by the real value.

Use a secret for any value you would not want others to read. For example:

  • the password of a test account in a browser login check,
  • an access token in the Authorization header of an API monitor,
  • an API key in the body of a multi-step API request.

Secrets belong to your team. Every team member can create them and use them in monitors.

Monitor typeCan use secrets?Where
BrowserYesThe value of a fill step
API (single request)YesThe URL, header values and the body
API multi-stepYesEach step's URL, header values and body
WebSocketYesThe URL, header values and the message it sends
URLNoUse an API monitor instead (see 8.3)
TCP, UDP, ping, gRPC, DNS, certificate, domain, heartbeatNo—

Secrets are write-once. You see the value one time, when you create it. After that, nobody can read it back or change it in obsrvly.

Last updated