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 published stories via 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: 'published',});For other languge-specific snippets, visit the Content Delivery API authentication page.
Read-write access tokens
Section titled “Read-write access tokens”Use these tokens to perform CRUD (create, read, update, delete) operations via the Management API. Learn more about personal and OAuth tokens in the Management API authentication page.
Personal access token
Section titled “Personal access token”This token is account-specific. To manage existing tokens or generate new ones, open your Account settings: My account → Account settings → Personal access tokens.
OAuth access token
Section titled “OAuth access token”This token is tied to a single space. Obtain it via the OAuth2 authentication flow and is tied to a single space.
Get in touch with the Storyblok community