I am struggling to get started with Storyblok CMS. I have been following some of the tutorials on the Interwebs, e.g., Nuxt JS with Storyblok, etc., but I cannot seem to successfully call the API without receiving a 401 'Unauthorized' exception.
At first, I thought it was my code so I tried:
curl "https://api.storyblok.com/v2/cdn/stories?token=MYTOKEN" -X GET -H "Accept: application/json" -H "Content-Type: application/json"
but that didn't work either. Double checked my token, etc. I must be missing something. I am on the non-paying Community plan right now.
It's likely the region you deployed to - if the US, the host is
api-us.storyblok.com. When using and initializing the JS API give it the optionregion: "us".Some sample code provided by a helpful commenter: