Almost EVERYONE who tried headless systems said they saw benefits. Download the state of CMS now!

Storyblok now on AWS Marketplace: Read more

O’Reilly Report: Decoupled Applications and Composable Web Architectures - Download Now

Empower your teams & get a 582% ROI: See Storyblok's CMS in action

Skip to main content

How to force the Content Delivery V1 in the Storyblok JS Client

  • FAQ
  • How to force the Content Delivery V1 in the Storyblok JS Client

You're able to force the use of the v1 Content Delivery API by applying the endpoint parameter option while initializing the Storyblok JS Client

Force Content Delivery V1 usage
        
      const config = { accessToken, ... }
const Storyblok = new StoryblokClient(config, 'https://api.storyblok.com/v1')
    

Full Example

You can find a full example using the parameter described in our API docs below.

Force Content Delivery V1 usage
        
      // npm install storyblok-js-client
const StoryblokClient = require('storyblok-js-client')

// init with access token
const Storyblok = new StoryblokClient({
  accessToken: 'wANpEQEsMYGOwLxwXQ76Ggtt',
  cache: {
    clear: 'auto',
    type: 'memory'
  }
}, 'https://api.storyblok.com/v1')