Authentication#
All requests to the Belga.press API have to be authenticated.
The authentication token serves as the identifier of the customer, for monitoring, billing and analytical purposes.Environments#
There are 2 environments of the Belga.press API, each having their own IDP.
Client ID / Client secret combinations are unique per environment.Obtaining an access token#
The Belga.press Identity Provider (IDP) implements the Open ID Connect (OIDC) specification.JWT tokens are obtained with the OIDC Client Credentials Flow, using the token endpoint to exchange Client ID and Secret for a valid access token.Parameters must be sent as URL encoded form, with content type application/x-www-form-urlencoded.
A regular JSON request will not work for this endpoint.
Example:
curl --request POST \
--url https://sso.ssl.belga.be/auth/realms/belga/protocol/openid-connect/token \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data grant_type=client_credentials \
--data client_id=MyClientID \
--data client_secret=6840610d-ae1f-465c-bfcf-54495bee8d0f
{
"access_token": "myBase64EncodedAccessToken",
"expires_in": 300,
"refresh_expires_in": 0,
"token_type": "Bearer",
"not-before-policy": 1559897307,
"scope": "profile email create_one_time_link"
}
Using the access token#
Authentication to the API requires a JWT token provided as Bearer token in an Authorization HTTP header.curl --request GET \
--url https://capi.belga.press/belgapress/api/boards \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer myBase64EncodedAccessToken'
Modified at 2025-10-28 10:21:35