Authentication
Each API call carries an access token (JWT) issued by the platform’s identity server, in the header
Authorization: Bearer <token>. Without a valid token, the API answers 401.
Your system’s account
Section titled “Your system’s account”The bank creates for each of its systems (core banking, mobile app, fraud tool…) a technical account
attached to the bank, with a role limited to what the system needs. The token carries that account’s bank
(tenant_id): all the data the system creates or reads are that bank’s, and only that bank’s.
| Information | Development |
|---|---|
| Identity server | http://localhost:8180/realms/ubo |
| Token endpoint | …/protocol/openid-connect/token |
| Client | ubo-api (confidential) |
| Token lifetime | 5 minutes, renewable |
Getting a token
Section titled “Getting a token”curl -s http://localhost:8180/realms/ubo/protocol/openid-connect/token \ -d grant_type=password -d client_id=ubo-api -d client_secret="$UBO_CLIENT_SECRET" \ -d username="$UBO_USER" -d password="$UBO_PASSWORD"const res = await fetch("http://localhost:8180/realms/ubo/protocol/openid-connect/token", { method: "POST", body: new URLSearchParams({ grant_type: "password", client_id: "ubo-api", client_secret: process.env.UBO_CLIENT_SECRET, username: process.env.UBO_USER, password: process.env.UBO_PASSWORD, }),});const { access_token, refresh_token, expires_in } = await res.json();import os, requestsr = requests.post("http://localhost:8180/realms/ubo/protocol/openid-connect/token", data={ "grant_type": "password", "client_id": "ubo-api", "client_secret": os.environ["UBO_CLIENT_SECRET"], "username": os.environ["UBO_USER"], "password": os.environ["UBO_PASSWORD"],})token = r.json()["access_token"]{ "access_token": "eyJhbGciOiJSUzI1NiIs…", "expires_in": 300, "refresh_token": "eyJhbGciOiJIUzUxMiIs…", "refresh_expires_in": 1800, "token_type": "Bearer" }Renew it before it expires with grant_type=refresh_token and the refresh_token.
The token’s rights
Section titled “The token’s rights”Permissions come from the account’s roles (see Users and roles): cards:read,
cards:write, authorizations:read, disputes:write… A call without the permission answers 403 with
the missing permission in the message. The account’s scope (some organisations) applies to the API too.
The platform administrator
Section titled “The platform administrator”A platform administrator account belongs to no bank. It chooses the bank of each call with the header
X-UBO-Tenant: <bank identifier>; without it, it reads every bank, read only. Its calls are logged and
visible to the banks concerned.
Quotas
Section titled “Quotas”Each bank has quotas of calls (per user and per bank, per minute) and of authorizations (per second).
Beyond them the API answers 429 with the header Retry-After (seconds to wait). See
Conventions.

