Skip to content

security.getSecret ​

Retrieves a secret value from the server's secret manager by key.

js
security.getSecret(key)

Parameters ​

ParameterTypeDescription
keystringThe key of the secret to retrieve.

Returns ​

string

The secret's value as a string.

Examples ​

js
const apiKey = security.getSecret("secret_name");