Access Tokens
Storyblok offers a rich set of APIs and services for delivering and managing content and assets. Tokens protect access to these services.
Read-only access tokens
Section titled “Read-only access tokens”Use read-only access tokens to view the content and assets in a specific space. To manage per-space tokens and generate new ones, select the space and open Settings → Access Tokens.
The following types of tokens are available:
- Public: access
publishedcontent using the Content Delivery API. - Preview: access
draftandpublishedcontent using the Content Delivery API. - Asset: access private assets using the Content Delivery API.
- Release: access content associated with a specific release. Requires the Releases App.
- Theme: access a theme for use by the Storyblok rendering service. Note: the Storyblok rendering service is deprecated.
The following snippet uses the @storyblok/js SDK to fetch unpublished stories from the Content Delivery API:
import { apiPlugin, storyblokInit } from '@storyblok/js';
const { storyblokApi } = storyblokInit({ accessToken: 'YOUR_ACCESS_TOKEN', use: [apiPlugin],});
// Use a public or preview access tokenconst { data } = await storyblokApi.get('cdn/stories', { version: 'draft',});Find other languge-specific snippets in the Content Delivery API authentication section.
Read-write access tokens
Section titled “Read-write access tokens”Use these tokens to perform CRUD operations via the Management API.
Personal access token
Section titled “Personal access token”This token is account-specific and can be generated in the account settings: My account → Account settings → Personal access tokens.S
OAuth access token
Section titled “OAuth access token”This token is obtained via the OAuth2 authentication flow and is tied to a single space.
Get in touch with the Storyblok community