API Explorer 1 endpoints

Create a Consumer

POST /obp/v7.0.0/management/consumers

OBPv5.1.0-createConsumer Roles: CanCreateConsumer Consumer

Create a Consumer (Authenticated access).

A Consumer represents an application that uses the Open Bank Project API. Each Consumer has:

  • A unique key (40 character random string) - used as the client ID for authentication
  • A unique secret (40 character random string) - used for secure authentication
  • An app_type (Confidential or Public) - determines OAuth2 flow requirements
  • Metadata like app_name, description, developer_email, company, etc.

How it works (for comprehension flow):

  1. Extract authenticated user: Retrieves the currently logged-in user who is creating the consumer
  2. Parse and validate JSON request: Extracts the CreateConsumerRequestJsonV510 from the request body
  3. Determine app_type: Converts the string "Confidential" or "Public" to the AppType enum
  4. Generate credentials: Creates random 40-character key and secret for the new consumer
  5. Create consumer record: Calls createConsumerNewStyle with all parameters:
    • Auto-generated key and secret
    • enabled flag (controls if consumer is active)
    • app_name, description, developer_email, company
    • redirect_url (for OAuth flows)
    • client_certificate (optional, for certificate-based auth)
    • logo_url (optional)
    • createdByUserId (the authenticated user's ID)
  6. Return response: Returns the newly created consumer with HTTP 201 Created status

Client Certificate (Optional but Recommended for PSD2/Berlin Group):

The client_certificate field provides enhanced security through X.509 certificate validation.

IMPORTANT SECURITY NOTE:

  • This endpoint does NOT validate the certificate at creation time - any certificate can be provided
  • The certificate is simply stored with the consumer record without checking if it's from a trusted CA
  • For PSD2/Berlin Group compliance with certificate validation, use the Dynamic Registration endpoint instead
  • Dynamic Registration validates certificates against registered Regulated Entities and trusted CAs

How certificates are used (after creation):

  • Certificate is stored in PEM format (Base64-encoded X.509) with the consumer record
  • On subsequent API requests, the certificate from the PSD2-CERT header is compared against the stored certificate
  • If certificates don't match, access is denied even with valid OAuth2 tokens
  • First request populates the certificate if not set; subsequent requests must match that certificate

Certificate validation process (during API requests, NOT at consumer creation):

  1. Certificate from PSD2-CERT header is compared to stored certificate (simple string match)
  2. Certificate is parsed from PEM format to X.509Certificate object
  3. Validated against a configured trust store (PKCS12 format) containing trusted root CAs
  4. Certificate chain is verified using PKIX validation
  5. Optional CRL (Certificate Revocation List) checking if enabled via use_tpp_signature_revocation_list
  6. Public key from certificate can verify signed requests (Berlin Group requirement)

Note: Steps 3-6 only apply during API request validation, NOT during consumer creation via this endpoint.

Security benefits (when properly configured):

  • Certificate binding: Links consumer to a specific certificate (prevents token reuse with different certs)
  • Request verification: Certificate's public key can verify signed requests
  • Non-repudiation: Certificate-based signatures prove request origin

Security limitations of this endpoint:

  • No validation at creation: Any certificate (even self-signed or expired) can be stored
  • No CA verification: Certificate is not checked against trusted root CAs during creation
  • No Regulated Entity check: Does not verify the TPP is registered
  • Use Dynamic Registration instead for proper PSD2/Berlin Group compliance with full certificate validation

For proper PSD2 compliance: Use the Dynamic Consumer Registration endpoint (POST /obp/v5.1.0/dynamic-registration/consumers) which:

  • Requires JWT-signed request using the certificate's private key
  • Validates certificate against Regulated Entity registry
  • Checks certificate is from a trusted CA using the configured trust store
  • Ensures proper QWAC/eIDAS compliance for EU TPPs

Configuration properties (for runtime validation):

  • truststore.path.tpp_signature - Path to trust store for certificate validation during API requests
  • truststore.password.tpp_signature - Trust store password
  • use_tpp_signature_revocation_list - Enable/disable CRL checking during requests (default: true)
  • consumer_validation_method_for_consent - Set to "CONSUMER_CERTIFICATE" for cert-based validation
  • bypass_tpp_signature_validation - Emergency bypass (default: false, use only for testing)

Important: The key and secret are only shown once in the response. Save them securely as they cannot be retrieved later.

redirect_url must meet the redirect URL rules (https; http only for localhost; or an app scheme in reverse-domain form; no wildcard, user information or fragment). On this instance a redirect URL may point to any host that meets the redirect URL rules. See here

If this Consumer is for an app your installation runs itself (such as the Portal, the API Manager, Opey or a monitoring service like OBP-Sentinel) and the app calls OBP with its own application token (OAuth2 client credentials, no User), those calls need Roles granted to the Consumer as Scopes. Have an administrator mark the Consumer as a Platform App (POST /obp/v7.0.0/management/platform-apps); the app then declares the Scopes it needs (PUT /obp/v7.0.0/consumers/current/platform-app), retrying until it is marked, and the administrator grants the missing ones. See here

Please note: Your consumer may be disabled as a result of this action.

User Authentication is Required. The User must be logged in. The Application must also be authenticated.

This endpoint supports User OR Application authentication. You can authenticate either as a logged-in User (with Entitlements) or as an Application using a Consumer Key (with Scopes). See here for more information.

This endpoint supports User OR Application authentication. You can authenticate either as a logged-in User (with Entitlements) or as an Application using a Consumer Key (with Scopes). See here for more information.

This endpoint supports User OR Application authentication. You can authenticate either as a logged-in User (with Entitlements) or as an Application using a Consumer Key (with Scopes). See here for more information.

JSON request body fields (9)
app_name
appNameBank
app_type
Web
company
Tesobe GmbH
description
Description of the object. Maximum length is 2000. It can be any characters here.
developer_email
enabled
false
redirect_url
https://apisandbox.openbankproject.com
client_certificate
client_certificate
logo_url
logo_url
JSON response body fields (25)
app_name
appNameBank
app_type
Web
certificate_pem
certificate_pem
company
Tesobe GmbH
consumer_id
7uy8a7e4-6d02-40e3-a129-0b2bf89de8uh
consumer_key
bwf0ykmwoirip1yjxcn15wnhuyxcziwgtcoaildq
consumer_secret
xwdgylv3vau0n2gkxu1aize4glapftfldp5y1bic
created
created_by_user
description
Description of the object. Maximum length is 2000. It can be any characters here.
developer_email
email
felixsmith@example.com
enabled
false
issuer_domain_name
issuer_domain_name
not_after
not_after
not_before
not_before
provider
ETHEREUM
provider_id
redirect_url
https://apisandbox.openbankproject.com
subject_domain_name
subject_domain_name
user_id
9ca9a7e4-6d02-40e3-a129-0b2bf89de9b1
username
felixsmith
certificate_info
certificate_info
logo_url
logo_url
roles_info
roles_info
Example request body
{
  "app_name": "appNameBank",
  "app_type": "Web",
  "description": "Description of the object. Maximum length is 2000. It can be any characters here.",
  "developer_email": "felixsmith@example.com",
  "company": "Tesobe GmbH",
  "redirect_url": "https://apisandbox.openbankproject.com",
  "enabled": true,
  "client_certificate": "-----BEGIN CERTIFICATE-----MIICsjCCAZqgAwIBAgIGAYwQ62R0MA0GCSqGSIb3DQEBCwUAMBoxGDAWBgNVBAMMD2FwcC5leGFtcGxlLmNvbTAeFw0yMzExMjcxMzE1MTFaFw0yNTExMjYxMzE1MTFaMBoxGDAWBgNVBAMMD2FwcC5leGFtcGxlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK9WIodZHWzKyCcf9YfWEhPURbfO6zKuMqzHN27GdqHsVVEGxP4F/J4mso+0ENcRr6ur4u81iREaVdCc40rHDHVJNEtniD8Icbz7tcsqAewIVhc/q6WXGqImJpCq7hA0m247dDsaZT0lb/MVBiMoJxDEmAE/GYYnWTEn84R35WhJsMvuQ7QmLvNg6RkChY6POCT/YKe9NKwa1NqI1U+oA5RFzAaFtytvZCE3jtp+aR0brL7qaGfgxm6B7dEpGyhg0NcVCV7xMQNq2JxZTVdAr6lcsRGaAFulakmW3aNnmK+L35Wu8uW+OxNxwUuC6f3b4FVBa276FMuUTRfu7gc+k6kCAwEAATANBgkqhkiG9w0BAQsFAAOCAQEAAU5CjEyAoyTn7PgFpQD48ZNPuUsEQ19gzYgJvHMzFIoZ7jKBodjO5mCzWBcR7A4mpeAsdyiNBl2sTiZscSnNqxk61jVzP5Ba1D7XtOjjr7+3iqowrThj6BY40QqhYh/6BSY9fDzVZQiHnvlo6ZUM5kUK6OavZOovKlp5DIl5sGqoP0qAJnpQ4nhB2WVVsKfPlOXc+2KSsbJ23g9l8zaTMr+X0umlvfEKqyEl1Fa2L1dO0y/KFQ+ILmxcZLpRdq1hRAjd0quq9qGC8ucXhRWDgM4hslVpau0da68g0aItWNez3mc5lB82b3dcZpFMzO41bgw7gvw10AvvTfQDqEYIuQ==-----END CERTIFICATE-----",
  "logo_url": "https://apisandbox.openbankproject.com/logo"
}
Example success response
{
  "consumer_id": "7uy8a7e4-6d02-40e3-a129-0b2bf89de8uh",
  "consumer_key": "bwf0ykmwoirip1yjxcn15wnhuyxcziwgtcoaildq",
  "consumer_secret": "xwdgylv3vau0n2gkxu1aize4glapftfldp5y1bic",
  "app_name": "appNameBank",
  "app_type": "Web",
  "description": "Description of the object. Maximum length is 2000. It can be any characters here.",
  "developer_email": "felixsmith@example.com",
  "company": "Tesobe Gmb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glsb2NhbGhvc3SH\r\nBH8AAAEwggEGBggrBgEFBQcBAwSB+TCB9jAIBgYEAI5GAQEwOAYGBACORgEFMC4w\r\nLBYhaHR0cHM6Ly9leGFtcGxlLm9yZy9wa2lkaXNjbG9zdXJlEwdleGFtcGxlMIGI\r\nBgYEAIGYJwIwfjBMMBEGBwQAgZgnAQMMBlBTUF9BSTARBgcEAIGYJwEBDAZQU1Bf\r\nQVMwEQYHBACBmCcBAgwGUFNQX1BJMBEGBwQAgZgnAQQMBlBTUF9JQwwlRHVtbXkg\r\nRmluYW5jaWFsIFN1cGVydmlzaW9uIEF1dGhvcml0eQwHWFgtREZTQTAlBgYEAI5G\r\nAQYwGwYHBACORgEGAQYHBACORgEGAgYHBACORgEGAzARBglghkgBhvhCAQEEBAMC\r\nB4AwHgYJYIZIAYb4QgENBBEWD3hjYSBjZXJ0aWZpY2F0ZTANBgkqhkiG9w0BAQsF\r\nAAOCAQEAKTS7exS9A7rWJLRzWrlHoTu68Avm5g9Dz1GKjgt8rnvj3D21SE14Rf5p\r\n0JWHYH4SiCdnh8Tx+IA7o0TmPJ1JRfAXR3i/5R7TJi/HrnqL+V7SIx2Cuq/hkZEU\r\nAhVs07nnvHURcrlQGwcfn4TbgpCURpCPpYZlNsYySb6BS6I4qFaadHGqMTyEkphV\r\nwfXyB3brmzxj9V4Qgp0t+s/uFuFirWyIayRc9nSSC7vuNVYvib2Kim4y8kvuWpA4\r\nZ51+fFOmBqCqpmwfAADNgDsLJiA/741eBflVd/ZUeAzgOjMCMIaDGlwiwZlePKT7\r\n553GtfsGxZMf05oqfUrQEQfJaU+/+Q==\n-----END CERTIFICATE-----\n",
  "certificate_info": {
    "subject_domain_name": "OID.2.5.4.41=VPN, EMAILADDRESS=admin@tesobe.com, CN=TESOBE CA, OU=TESOBE Operations, O=TESOBE, L=Berlin, ST=Berlin, C=DE",
    "issuer_domain_name": "CN=localhost, O=TESOBE GmbH, ST=Berlin, C=DE",
    "not_before": "2022-04-01T10:13:00.000Z",
    "not_after": "2032-04-01T10:13:00.000Z",
    "roles_info": "PEM Encoded Certificate does not contain PSD2 roles."
  },
  "created_by_user": {
    "user_id": "9ca9a7e4-6d02-40e3-a129-0b2bf89de9b1",
    "email": "felixsmith@example.com",
    "provider_id": "Chris",
    "provider": "http://127.0.0.1:8080",
    "username": "felixsmith"
  },
  "enabled": true,
  "created": "1100-01-01T00:00:00Z",
  "logo_url": "https://apisandbox.openbankproject.com/logo"
}
Possible errors (7)
  • OBP-20001: User not logged in. Authentication is required!
  • OBP-20006: User is missing one or more roles:
  • OBP-10001: Incorrect json format.
  • OBP-20108: Invalid redirect URL. Each redirect URL must use https, use http only for localhost, 127.0.0.1 or [::1], or use an app scheme in reverse-domain form such as com.example.app, and must not contain a wildcard, user information or a fragment. Rejected entry:
  • OBP-20109: Redirect URL host not allowed. This instance only accepts redirect URLs that point to the hosts listed for it. Rejected entry:
  • OBP-50000: Unknown Error.
  • OBP-20200: The application cannot be identified.
Implemented by OBPv5.1.0 createConsumer Originally /obp/v5.1.0/management/consumers