About the Secrets API

With the Secrets API you can create and manage secrets such as API keys. The value of each secret is safely stored and encrypted by Wix, so you can securely store API keys and other secrets. Each secret value is encrypted and assigned a name of your choice and an ID. You can then use the name to refer to the secret in your code rather than hardcoding its value.

With the Secrets API, you can safely:

  • Create/delete/update a secret.
  • Retrieve a value of a secret.
  • Retrieve other information about your secrets, such as their names and descriptions.

Before you begin

It's important to note the following:

  • Before you can create or manage secrets with the Secrets API, install the Wix Members Area app. The Members Area isn't required to retrieve secrets with the Get Secret Value endpoint.
  • Deleting a secret, or modifying a secret's name or value, breaks all code using the secret.
  • You can't create or rename a secret with a name that's already in use.
  • If you currently use private keys in your code, we recommend removing them and recreating those keys with this API. Don't leave private keys in your code. Leaving them in is a security risk. Make sure to delete the keys from the code after calling the Update Secret endpoint.

Use Cases

Terminology

  • Secret: Secrets are values that you don’t want to be publicly accessible, such as login credentials or API keys.
  • API key: An API key is a unique code used to authenticate a user or program when making a call to an API.
Was this helpful?
Yes
No