Authentication

The Management API let’s you read and write all the data you have access to from Storyblok. It can be used to extend the functionality of Storyblok - For example to import data from other sources.

The easiest way to get started is to create an OAuth2 token using the Storyblok app. Go to the My Account at app.storyblok.com and click on “Generate new token”.

Using an OAuth2 token, a username and password doesn’t need to be permanently stored and you can revoke access at any time.

Examples

var axios = require('axios')

axios.get('https://api.storyblok.com/v1/spaces', {
  headers: {'Authorization': 'YOUR_AUTH_TOKEN'}
})
.then(function (response) {
  console.log(response.data)
})
.catch(function (error) {
  console.log(error.response.data)
})
gem 'redis'

RestClient.get 'https://api.storyblok.com/v1/spaces',
    {:Authorization => 'YOUR_OAUTH_TOKEN'}
$request = new HttpRequest();
$request->setUrl('https://api.storyblok.com/v1/spaces');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders(array(
  'Authorization' => 'YOUR_AUTH_TOKEN'
));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}

Documentation