Secret management
Keep sensitive data out of plaintext.
To keep sensitive data like API keys and passwords secret, instead of including those in plaintext in code you can use the secret manager to store them and retrieve them in code only when needed. To do so, open the secret manager from the settings menu:
Storing secrets in the secret manager
Once the secret data is there and given a name, you can retrieve the secret in your code using context.get_secret('my_secret_name').
slack_api_token = context.get_secret('slack_api_token')
slack_client = slack_sdk.WebClient(token=slack_api_token)
# Use slack_client to send messages, etc.
Copy link