Back to overview

API Usage Example

Follow the steps below to get started using our API:

Step 1: Authorize using OAuth client credentials flow

This token can be used to access the databases through the api.

Request


POST /token HTTP/1.1
Host: https://content.bookzoapi.nl/v1/token
Content-Type: application/x-www-form-urlencoded
x-subscription-key: your-subscription-key

grant_type=client_credentials
&client_id=your-subscription-key
&client_secret=your-api-key

Response


HTTP/1.1 200 OK
Content-Type: application/json

{
    "access_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6Ij...",
    "token_type": "Bearer",
    "expires_in": 899,
}

Step 2: Use the obtained access token to make a GET request to /databases

This call shows you the names of the databases

Request

        
GET /databases HTTP/1.1
Host: https://content.bookzoapi.nl/v1/databases
Authorization: Bearer your-access-token
x-subscription-key: your-subscription-key

Response


HTTP/1.1 200 OK
Content-Type: application/json

{
    "databases": [
        {
            "datebaseName": "name1"
        },
        {
            "databaseName": "name2"
        }
    ]
}

Step 3: You're All Set!

Congratulations! You have successfully authorized and made a GET request to /databases. You now have everything you need to connect to our API.

Explore Swagger Documentation