Skip to main content
[StoryblokStoryID:245122200]

Live article: https://www.storyblok.com/faq/force-content-delivery-v1-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 Copy to clipboard
        
      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 Copy to clipboard
        
      // 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')