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')