How to define a specific region when using the Content Delivery API
- FAQ
- How to define a specific region when using the Content Delivery API
Adding a region parameter to an API request
In order to use the correct region that matches the region of your space, you have to use a different base URL.
The base URL for spaces created in the EU is:
https://api.storyblok.com/v2
The base URL for spaces created in the US is:
https://api{-us}.storyblok.com/v2
The base URL for spaces created in China is:
https://app.storyblokchina.cn
Adding a region parameter when using an SDK
JavaScript
Setting the correct region
Depending on whether your space was created in the EU, the US, or China, you may need to set the region
parameter of the API accordingly:
eu
(default): For spaces created in the EUus
: For spaces created in the UScn
: For spaces created in China
Here's an example for a space created in the US:
apiOptions: {
region: "us",
},
Note: For spaces created in the United States or China, the region parameter must be specified.
Since all the Storyblok SDKs use storyblok-js-client, you can use apiOptions
to pass down any option such as region
to the JS Client.
Please consult our SDK documentation to find specific instructions for the JavaScript frontend framework of your choice:
Please note that our Ruby Client currently doesn’t support accessing spaces located in China.
Please note that our PHP Client currently doesn’t support accessing spaces located in China.
Python
Please note that our Python Client currently doesn’t support accessing spaces located in the United States or China.