Store secrets
Keep API keys and credentials out of extension code by declaring them as settings, with different values per environment.
Secrets and environment variables are not stored in extension code. They go in extension settings instead.
Declare the setting in code, then read it in the extension's custom actions.
How a secret reaches an action
- The extension code defines the setting, marked
obfuscated: true. - The person installing the extension enters the value securely in the Awell platform.
- The action reads it from the payload at run time.
The code never contains the secret, only the name of a setting whose value someone else supplies.
The same setting holds different values per environment
Awell supports multiple environments, such as Sandbox and Production, and the same setting can hold a different value in each.
An extension installed in Sandbox points at a test account while the same extension in Production points at the real one, with no code difference.
Settings arrive in the onEvent payload
Settings arrive in the onEvent payload alongside the action's field values. See
The onEvent function.
Next steps
Next: Create an action.