API Tokens
Create and manage personal API tokens for authenticating with the SecretStash API and CLI.
API tokens allow you to authenticate with the SecretStash API from the CLI or any third-party integration. Tokens are personal to your account and are used to identify and authorize your requests.
Creating a Token
Navigate to API Tokens
Go to Settings > API Tokens from the sidebar navigation.
Enter a token name
Provide a descriptive name for your token (e.g., "CLI Token", "CI/CD Token"). This helps you identify the token's purpose later.
Generate the token
Click Create. A dialog will display your new API token.
Copy the token
Copy the token immediately and store it in a secure location.
Your API token is only displayed once at the time of creation. For security, it cannot be viewed again. If you lose your token, you must delete it and create a new one.
Using Your Token
Add the token to your application's .env file for use with the SecretStash CLI:
The CLI will use this token to authenticate all API requests. See the CLI Configuration for more details.
Managing Tokens
The API Tokens settings page lists all of your existing tokens, showing:
- Token name
- Last used date (or "Never used" if the token hasn't been used yet)
- Created date
Deleting a Token
Click the Delete button next to any token to revoke it. You will be asked to confirm before the token is permanently removed.
Deleting a token immediately revokes access. Any CLI or integration using the deleted token will no longer be able to authenticate.
Next Steps
- Configure the CLI with your token by following the Installation guide.
- Learn about all available CLI Commands.
Manage your tokens at: secretstash.cloud/settings/tokens