Authentication

Our API uses a combination of subscription key and JWT to authenticate each request. Check out the steps below to get yourself ready.

1. Register

First you will need to create an account on our developer portal or, if you already have one, log into it.

2. Subscription key

All our APIs are part of a specific product you need to subscribe to. For example, the Betterspace Basic product contains all necessary APIs to access occupancy related functions. When you subscribe to a product, you will get a subscription key which will be used later when accessing the APIs that are part of the product (for example creating an occupancy).

Once logged in, go to the Subscriptions page and select a product (a list of APIs) that fits your needs. Press Subscribe after choosing a name for your subscription.


Some subscriptions will need Betterspace approval to get access to, others can be subscribed to without any further approvals. Once you are subscribed, you will be able to see your subscription key in the Profile section.

The subscription key will be used as soon as you want to access specific APIs late (see Example section). Make sure to save it somewhere for now.

3. Client id and client secret

To get specific location access, a company administrator needs to create a new API integration in the integrations menu for a specific location. This will generate a client Id and client secret for this location, which can be used to generate an access token.

  1. Login and select your company

  2. Choose Integration on the side menu

  3. Find API and Add a new integration to a specific location

  4. Credentials will be presented to you on the last page

  5. Your credentials can be accessed at any time in the Administration tab.

4. Generate access token

With the client Id and client secret, you will now generate an access token. Later, the token will be used together with the subscription key to access the API for a specific location.

Your need to generate a new access token every 60 minutes.

Use client Id and client secret to generate an access token. This token can be generated by using the following request:

POST https://api.betterspace.cloud/oauth/v1/token
curl Example
Example Response

5. Done

Reading this paragraph probably means that you have everything necessary to talk with our API. This means you have:

  • A developer account.

  • A subscription key - This key tells us what API you are allowed to use.

  • An access token - This token tells us what location data you are allowed to see.

You should take a visit to our Examples section.