storyblok / gatsby-storyblok-boilerplate

Gatsby starter template with Storyblok's headless cms and true preview
https://www.storyblok.com/tp/add-a-headless-cms-to-gatsby-5-minutes
BSD Zero Clause License
37 stars 28 forks source link

Error: Request failed with status code 401 #46

Closed raqibjs closed 2 years ago

raqibjs commented 2 years ago

I have tried the NextJS boilerplate also. The same thing happening, 401 error!

image

Pls help @onefriendaday @sebgie @NeoLegends @samuells

raqibjs commented 2 years ago

I have pointed out the issue. The space server location was "US". It causing the issue. The "EU" server working fine!

If you want to select the US server. You do have to specify the "us" region specifically in the gatsby-config.js file.

options: {
        accessToken: process.env.GATSBY_STORYBLOK_ACCESS_TOKEN,
        ....
        ....
        region: 'us'  // <<------------------ Add this line
      }