Nabla Connect is intended to be used by your backend systems, allowing them to authenticate and interact with the Nabla. Authentication for Nabla Connect follows the OAuth 2.0 client credentials flow with JWT-based client assertions.

1. Creating an OAuth Client

An OAuth Client is the entity that authenticates with Nabla Connect on behalf of your backend system. The OAuth Client is responsible for securely managing authentication credentials. To start, you'll need to create an OAuth Client in the Nabla Connect Admin. When doing so, you should provide either of the two following options:

Upon creation, copy the OAuth Client's UUID to reference it when constructing the JWT Client Assertion.

image.png

Regularly rotate the OAuth keys

It’s critical to regularly rotate your keys to maintain the security of your integration. If you choose the JWKS URL option, rotating keys is easier because you can update the keys at your endpoint without any downtime. With a static public key, you’ll need at each rotation to manually create a new OAuth Client, migrate your assertion building and signing, then after a certain migration period manually delete the old OAuth Client.

2. Fetching the OAuth token.

<aside> <img src="/icons/info-alternate_lightgray.svg" alt="/icons/info-alternate_lightgray.svg" width="40px" />

The <baseUrl> for all APIs is [https://<region>.api.nabla.com/v1/connect/server](https://app.nabla.com/api/<REGION>/v1/connect/server)
<region> is us or eu

</aside>

<aside> 📝

1. Constructing a JWT Client Assertion

The client assertion is a one-time JWT used to authenticate your request to the <baseUrl>/oauth/token endpoint. The JWT must include the following claims, split between the header and body:

In the JWT header