Define and Manage Secrets
On this page
Define a Secret
Create a New Secret
Click Values in the left navigation menu and then click Create New Value. Enter a name for the value and then select Secret for the value type.
Note
Secret Name Restrictions
Secret names must not exceed 64 characters and may only contain ASCII letters, numbers, underscores, and hyphens. The first character must be a letter or number.
To define a new secret, call appservices secrets create
. The CLI will
prompt you for your App ID as well as a name and value for the secret.
appservices secrets create
You can also specify the arguments when you call the program:
appservices secrets create --app=<Your App ID> \ --name="<Secret Name>" \ --value="<Secret Value>"
View Secrets
To see a list of the names and IDs of all secrets in an app, click Values in the left navigation menu. The table on the Values screen shows a list of all values, including secrets, and indicates each value's type in its row.
To list the names and IDs of all secrets in an app, call appservices
secrets list
. The CLI will prompt you for your App ID.
appservices secrets list
You can also specify the App ID when you call the program:
appservices secrets list --app=<Your App ID>
Update a Secret
To update a secret:
Click Values in the left navigation menu.
Find the value that you want to update in the table, open its Actions menu, and select Edit Secret.
Select the Add Content input and enter the new value.
Click Save.
To update the value of a secret, call appservices secrets update
. The
CLI will prompt you for your App ID.
appservices secrets update
You can also specify the App ID when you call the program:
appservices secrets update --app=<Your App ID> \ --secret="<Secret ID or Current Name>" \ --name="<Updated Secret Name>" \ --value="<Updated Value>"
Access a Secret
You cannot directly read the value of a Secret after defining it. There are two ways to access a Secret that already exists in your app:
Link to the Secret by name in Authentication Provider and Service configurations.
Expose the Secret with a Secret Value. You can access the Secret Value in function's with context.values or in a rule expression with
%%values
.
Delete a Secret
To delete a secret:
Click Values in the left navigation menu.
Find the value that you want to delete in the table, open its Actions menu, and select Delete Secret.
Confirm that you want to delete the secret.
To delete a secret, call appservices secrets delete
. The CLI will prompt
you for your App ID and list users in that app for you to select.
appservices secrets delete
You can also specify the arguments when you call the program:
appservices secrets delete --app=<Your App ID> --secret=<Secret ID>
Tip
You can delete multiple secrets with a single command by specifying
their name
or id
values as a comma-separated list.
appservices secrets delete --app=<Your App ID> --secret=some-api-key,609af850b78eca4a8db4303f