Skip to content

API Keys

Most endpoints on both services are called by your own application: they start sessions, create credential configurations and DCQL queries, revoke credentials, and read session status. Those endpoints are authenticated with an API key, presented as a bearer token.

Endpoints the wallet calls are public by necessity — a wallet has no credentials of yours — and are secured by the session identifier in their path instead.

Getting a key

A tenant's API keys are added through the admin endpoints, naming the application each is for. The service generates the key, shows it once, in its answer, and keeps only a hash of it.

Using a key

Send it as a bearer token:

curl -X POST http://localhost:8081/presentation/oid4vp/new-session \
  -H 'Authorization: Bearer veUpCKs6U62JYBy9n7v8ZKZUYDIeBCXQ1A8hlR57p4cLKayiAd9nKfI9NXuE9Fna' \
  -H 'Content-Type: application/json' \
  -d '{ "verification_query_id": "b841f44a-d09a-4605-9ef9-b5d99a987ef7" }'

A missing or unrecognized key returns 401. If a call you expect to work returns 401, this header is the first thing to check — every example of such a call in this documentation includes it.

Which endpoints need a key

Issuer — authenticated:

  • POST /issuance/oid4vci/new-session
  • GET /issuance/oid4vci/status/{session_id}
  • GET /credential-configuration/{credential_configuration_id}
  • POST /credential-configuration/create
  • POST /credential-configuration/remove/{credential_configuration_id}
  • POST /credential-status/revoke/{session_id}

Verifier — authenticated:

  • POST /presentation/oid4vp/new-session
  • POST /presentation/oid4vp/static-presentation
  • PUT /presentation/oid4vp/static-presentation/{static_presentation_id}
  • GET /presentation/oid4vp/status/{session_id}
  • POST /verification-query/create
  • GET /verification-query/{verification_query_id}

Both services — authenticated with a scrape token, not an API key:

  • GET /metrics

Both services — authenticated with an admin key, not an API key:

  • Everything under /admin/tenants

Everything else on both services is reached by the wallet, is a health probe, or is a published document such as the issuer's status list. Each service serves its own OpenAPI specification at GET /openapi, where every endpoint's security requirement is part of the specification; /metrics and the health probes are not in it.

Managing keys

  • Add one key per calling application, so you can tell which belongs to which, and revoke one without the others. That is what the client is for.
  • Store each key where its application reads it, and keep it out of version control. The service shows it only once. See Going to production.
  • Revoke a key with DELETE /admin/tenants/{code}/api-keys/{id}. It is refused from then on. There is no expiry and no per-key rate limiting.

What's Next