Skip to main content

Verify credentials

To check a holder's credential, you send them a verification request made from a verification template. In the SDK, a verification request is called a proof request.

In EU Digital Identity, Microsoft Entra and Polygon, the response contains a verificationUrl: show it to the holder as a QR code or link. In cheqd and Indicio, the request is sent over a connection, so you pass a connectionId.

Send proof request​

Sends a verification request.

import { OpenIdEcosystem } from '@hovi/core-sdk';

const openid = new OpenIdEcosystem({
apiKey: '<YOUR_API_KEY>',
});

const request = await openid.sendProofRequest({
organizationId: '<ORGANIZATION_ID>',
verificationTemplateId: '<VERIFICATION_TEMPLATE_ID>',
});

Params​

ParameterTypeDescription
organizationIdstring (Required)Your organization ID.
verificationTemplateIdstring (Required)The ID of the verification template to use.
connectionIdstring (Optional)cheqd and Indicio: the ID of the connection to send the request to.
commentstring (Optional)A message for the holder.

Get all proof requests​

Lists an organization's verification requests.

import { OpenIdEcosystem } from '@hovi/core-sdk';

const openid = new OpenIdEcosystem({
apiKey: '<YOUR_API_KEY>',
});

const requests = await openid.getAllProofRequests({
organizationId: '<ORGANIZATION_ID>',
});

Params​

ParameterTypeDescription
organizationIdstring (Required)Your organization ID.
statestring (Optional)Return only requests in this state: pending, done or abandoned. Microsoft Entra also uses expired.

Get proof request by ID​

Gets one verification request, for example to see whether the holder has answered. The state done means the credential was valid.

import { OpenIdEcosystem } from '@hovi/core-sdk';

const openid = new OpenIdEcosystem({
apiKey: '<YOUR_API_KEY>',
});

const request = await openid.getProofRequestById({
organizationId: '<ORGANIZATION_ID>',
proofExchangeId: '<PROOF_EXCHANGE_ID>',
});

Params​

ParameterTypeDescription
organizationIdstring (Required)Your organization ID.
proofExchangeIdstring (Required)The ID of the verification request, returned when you sent it.