Skip to main content

Connecting to the API

Server Endpoint

API Root Path
Keycloak Auth Path


For requests that require authentication, you will need to have your users authenticate via our OAuth mechanisms handled with Keycloak. See Keycloak for more information.

There are many libraries available for a lot of languages to help you with this.

If you want to manually integrate, here are the OAuth2 relevant URls:

Authorization URL
Token URL
Refresh URL


For requests that require authentication, you need to provide a Bearer token, obtained from Keycloak (see above).

Authorization: Bearer TOKEN

Javascript library

We provide a Javascript library to help you use the API. Sources are available on Github.

To install the library, you can use npm:

npm install @fairandsmart/consents-ce

Or you can include the library in your HTML page:

<script src=""></script>

When the consent.js file is imported via a script tag, the SDK features are available in the window.FairAndSmart global variable of your web page.


The full documentation for the library is available here.