Skip to Content
RegistrationClient ManagementGet a management access token

Get a management access token

Use an OAuth2 client-credentials grant  to obtain a token for TPP management operations. Use the clientId and clientSecret returned during TPP registration.

A plain client_credentials token is sufficient. Management operations do not require a scope, and requesting a scope your client is not registered for fails with invalid_scope.

Request a token

EnvironmentToken endpoint
Productionhttps://auth.openbanking.prod.lunar.app/oauth2/token
Sandboxhttps://auth.sandbox.openbanking.prod.lunar.app/oauth2/token
CREDENTIALS=$(echo -n "your-client-id:your-client-secret" | base64) curl \ -H "Content-Type: application/x-www-form-urlencoded" \ -H "Authorization: Basic $CREDENTIALS" \ -X POST \ -d "grant_type=client_credentials" \ https://auth.openbanking.prod.lunar.app/oauth2/token

The token endpoint uses HTTP Basic authentication (client_secret_basic) and does not require eIDAS mTLS.

How management requests are authorized

Management endpoints authorize a request on two things:

  • mTLS with a valid eIDAS QWAC.
  • The token subject (sub) matching the {clientId} in the request path.

A token can therefore only manage the client it was issued for. The token’s scopes are not part of this check, so a token minted without any scope works for every management endpoint.

Use the token

The response contains an access_token. Send it in subsequent management requests:

Authorization: Bearer <access-token>

Some management operations have additional requirements. For example, adding a certificate validates the new chain against the roles your client is registered for.

  • Error responses — the error envelope and codes returned by management endpoints
Last updated on