Variables
Secure storage for API keys and other information
The variables API allows you to store information like API keys securely and access them from your Repeat.
Examples
Adding a new variable
On the sidebar of your Repeat, click on the Variables tab.
Here, you’ll be able to enter a Key which is the name of the variable as well as the value.
The Encrypt checkbox allows you to mask the value in the Repeat dashboard.
Accessing variables
Once you’ve added a variable to your Repeat, you can then access through env.variables
.
export default {
async webhook(request: Request, env: Repeat.Env) {
console.log(env.variables.FOO);
},
};
Last updated on November 11, 2022