Skip to main content

Credential Verification

Proof requests enable the initiation and management of credential verification processes across multiple ecosystems (OpenID, Privado ID, Indicio, Cheqd). These methods allow you to send proof requests, retrieve a list of requests, and fetch details of a specific request. This section covers methods to send, list, and retrieve proof requests.

Send Proof Request

Sends a proof request to a connection or tenant for credential verification.

import { OpenIDEcosystem } from '@openid/core-sdk';

const openid = new OpenIDEcosystem({
apiKey: 'your-ecosystem-api-key',
});

const result = await openid.sendProofRequest({
tenantId: 'your-tenant-id',
verificationTemplateId: 'your-verification-template-id',
connectionId: 'your-connection-id',
});

Params

ParameterTypeDescription
tenantIdstring (Required)The ID of the tenant initiating the request.
verificationTemplateIdstring (Required)The ID of the verification template to use.
commentstring (Optional)A comment or message for the request.
connectionIdstring (Optional)The ID of the connection to send the request to (if omitted, the request is broadcast).
note
  • If connectionId is omitted, the request is sent to all connections associated with the tenant.
  • Ensure the verificationTemplateId corresponds to a valid template.

Get All Proof Requests

Retrieves a list of proof requests associated with a tenant, with an optional filter by state.

import { OpenIDEcosystem } from '@openid/core-sdk';

const openid = new OpenIDEcosystem({
apiKey: 'your-ecosystem-api-key',
});

const requests = await openid.getAllProofRequests({
tenantId: 'your-tenant-id',
});

Params

ParameterTypeDescription
tenantIdstring (Required)The ID of the tenant to query.
statestring (Optional)The state of the proof requests to filter by (e.g., `pending`, `completed`; if omitted, returns all states).
note
  • Use the state filter to narrow down requests (e.g., pending, completed, rejected).
  • Check GetProofRequestsResponse for the full structure of returned objects.

Get Proof Request by ID

Retrieves details of a specific proof request by its ID.

import { OpenIDEcosystem } from '@openid/core-sdk';

const openid = new OpenIDEcosystem({
apiKey: 'your-ecosystem-api-key',
});

const request = await openid.getProofRequestById({
tenantId: 'your-tenant-id',
proofExchangeId: 'proof-456',
});

Params

ParameterTypeDescription
tenantIdstring (Required)The ID of the tenant owning the request.
proofExchangeIdstring (Required)The ID of the proof request to retrieve.
note
  • Use this to check the status or results of a specific proof request.
  • Ensure the proofExchangeId is valid and associated with the tenant.