Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update readme with new regions. #97

Merged
merged 1 commit into from
Dec 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 17 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,18 @@ $result = $managementClient->delete('spaces/' . $spaceId . '/stories/' . $storyI
print_r($result);
```

### Using spaces created in the US region for Management API
### Using spaces created in other regions for Management API

When creating a Space, you can select the EU or US region.
If you want to access a Space created in US region, you need to define the `apiEndpoint` parameter with 'api-us.storyblok.com' value, and forcing the `ssl` option for using HTTPS protocol:
When creating a Space, you can select the EU, US, CA, AP region. The default region is EU.
```
EU: api.storyblok.com
US: api-us.storyblok.com
CA: api-ca.storyblok.com
AP: api-ap.storyblok.com
```

For example:
If you want to access a Space created in US region, you need to define the `apiEndpoint` parameter with `api-us.storyblok.com` value, and forcing the `ssl` option for using HTTPS protocol:

```php
use Storyblok\ManagementClient;
Expand Down Expand Up @@ -193,10 +201,12 @@ use Storyblok\Client as StoryblokClient;
$client = new StoryblokClient('your-storyblok-readonly-accesstoken');
```

### Using spaces created in the US region
### Using spaces created in the other regions

When you create a Space, you can select the region: EU, US, CA or AP.

When you create a Space, you can select the region: EU or US.
If you want to access a Space created in US region, you need to define the `apiRegion` parameter with 'us' value (or 'US'):
For example:
If you want to access a Space created in US region, you need to define the `apiRegion` parameter with the `us` value (or `US`):

```php
use Storyblok\Client;
Expand All @@ -219,7 +229,7 @@ $client = new Client(
);
```

Now you have the `Storyblok\Client` instance you can start consuming data.
Now you have the `Storyblok\Client` instance you can start consuming data.

### Load a Story by slug

Expand Down
Loading