A Storyblok API token gives a script or a front end access to a Storyblok space, which is the content workspace that holds the pages and components of a website. Depending on how it was created, the token can read published content, read draft content, or change content through the management API. A leaked token that can read drafts exposes unpublished work, and one that can write can change what visitors see. Rotate the token first, then review what it read or changed.
Check your GitHub account for leaked secrets — free
- Provider
- Storyblok
- Severity
- Medium
- Impact
- SaaS account access and billing
- Checked live by LeakWatch
- No
What a Storyblok API Token looks like
Storyblok tokens are strings of letters and digits that end in the two letters tt. There is no leading prefix, so the detection relies on the word “storyblok” appearing close to the value, usually in a configuration file or a build variable:
STORYBLOK_API_TOKEN=… Storyblok API token (masked)
The distinctive ending helps when reading a file by hand, but many random strings end in the same two letters, so the vendor’s name next to the value is the stronger signal. Storyblok distinguishes between tokens for reading published content and tokens for previews or management, so check which one you have before you rotate it.
How Storyblok API Tokens get leaked
- Front-end code. A preview token placed in a web page or a static build, which exposes draft content to anyone who reads the source.
- Build configuration. A hosting setting or a CI file that writes the token into a committed file.
- Migration scripts. A content import tool shared with a contractor or posted with the token inside.
- Logs. A build step that prints its environment or the request it sends when a content fetch fails.
- Public examples. A starter project or a tutorial that shipped with a working token.
What to do in the first hour
- Revoke the token. Open the account settings for your Storyblok space, find the access token that leaked and revoke it. Do this first, because a live preview token can expose drafts while you investigate.
- Create a replacement with the narrowest access your site needs. A public site normally needs only published content, so do not reuse a preview or management token for it.
- Review the content history. Check recent changes, publishes and deletions in the space. Restore anything that was changed without your approval.
- Check the assets and components. Look for assets or components that were added or edited without your knowledge.
- Check the other tokens in the space and remove any you no longer use.
- Look at other secrets in the same build, such as hosting and deployment tokens. Rotate them too. See I accidentally pushed an API key to GitHub for the order of steps.
- Clean the repository. Store the token in your hosting provider’s secret settings and remove it from the files. Rebuild the site so the old value is no longer shipped.
Not sure what else leaked? Run a free scan.
Revoke it at Storyblok
Access tokens are managed in the settings of each space, under the API keys area. Open account settings, select the space and find the token. Revoke it there and create the replacement with the scope your site needs. We have not confirmed the current labels on that page, so follow what the space settings show you, and check that you are in the correct space.
How LeakWatch detects it
The rule is called Storyblok API Token. It looks for the word “storyblok” in any case, followed within about 40 characters by a value of 22 letters or digits that ends in tt, with word boundaries on both sides. The vendor’s name is required, so the ending alone is not reported. The severity is medium, with the impact class for SaaS tools. This type is not checked live: LeakWatch does not send a request to Storyblok with the value it found.
LeakWatch detects this format but does not check it live: it can tell you the key is exposed, not whether it still works. Assume it does until you have revoked it.
FAQ
Is a preview token more dangerous than a public one?
Yes, when it can read drafts. Preview content is unpublished, so a leak can reveal work that was never meant to be seen.
Can I leave a read-only token in the front end?
Only if the content it can read is meant to be public. Check the token’s access level before you decide, and prefer a server-side fetch for anything sensitive.
How do I know if the token was used?
Check the space’s activity or access history, if your plan provides it, and compare it with your deployments.