Callback and SSE

The verifier service can be configured to use a callback or Server Sent Events (SSE) to be notified when the verification session is completed.

Callback

The callback is a URL that will be called when the verification session is completed. The callback will be called with the verification session ID and the verification session object.

In previous versions of the verifier service, the callback information was passed through headers. This is no longer supported and the required configuration is now passed in the body of the request.

Example Request:

{
"dcql_query": {
  "credentials": [
    {
      "id": "example_openbadge_jwt_vc",
      "format": "jwt_vc_json",
      "meta":  {
        "type_values": [
          [
            "VerifiableCredential",
            "OpenBadgeCredential"
          ]
        ]
      },
      "claims": [
        {
          "path": [
            "name"
          ]
        }
      ]
    }
  ]
},
"webhook": {
  "url": "https://example.com/callback",
  "basicAuthUser": "1234567890",
  "basicAuthPass": "1234567890",
  "bearerToken": "1234567890"
}

Body Parameters

  • dcql_query: The DCQL query to be used for the verification.
  • webhook: The webhook configuration to be used for the verification.
    • url: The URL to be called when the verification session is completed. For authentication, you can use basic authentication or bearer token authentication.
    • basicAuthUser: The username for basic authentication.
    • basicAuthPass: The password for basic authentication. OR
    • bearerToken: The bearer token for bearer authentication.

Server Sent Events (SSE)

The SSE is a stream of events that will be sent to the client when the verification session is completed. The events will be sent to the client via a WebSocket connection.

From the desired client, you can subscribe to the SSE stream by using the following endpoint:

curl -X 'GET' \
  'https://{orgID}.enterprise-sandbox.waltid.dev/v1/{verificationSessionID}/verifier2-service-api/verification-session/events' \
  -H 'Authorization: Bearer {yourToken}'

Path Parameters

  • orgID: The organization ID.
  • verificationSessionID: The target indicates the verification session to target, generally given as {target}.{sessionID} (e.g. org.tenant.verifier.61566cec-23ea-4fca-9049-5c8b316e3271) which is returned in the creationTarget parameter when creating the verification session.

Verification Session Info

As is the case with polling the verification session info endpoint, both the callback andthe SSE stream will return the verficiation session object containing the following useful fields:

  • status: The status of the verification session.
  • attempted: Whether the verification session has been attempted.
  • reattemptable: Whether the verification session can be retried.
  • policyResults: The results of the policies applied to the verification session.
  • presentedRawData: The raw data verifiable presentation token.
  • presentedCredentials: The parsed credentials presented by the user.

Policy results will be split into vcPolicy and vpPolicy results. More information about the policy results can be found here.

Last updated on November 4, 2025