Skip to main content

OpenID4VP - Send and Verify Credentials

Here are the steps to send and verify credentials using OpenID for Verifiable Presentation (OpenID4VP).

Step 1: Get the API Key

To obtain your API key, please contact support@igrant.io. Once you have received your API key, enter it in the field below and click the Set API Key button to save it for future use.

Step 2: Create Presentation Definition (Verifier Admin)

To create a presentation definition for requesting proof, you can run the code block below using the Run button. Alternatively, you can manually copy the code block and use it in the body of the API request provided here.

Request

W3C VC (JWT)

Response

tip

Once a presentation definition is created, the presentationDefinitionId can be reused to verify multiple credentials (Step 3).

Step 3: Create Verification Request (Verfier/Relying Party)

To create the verification request, execute the code block below using the Run button. Alternatively, you can manually copy the code block and use it in the body of the API request available here.

After receiving the response, toggle the button provided to dynamically generate a QR code. The EUDI Wallet/Holder can then accept the credential offer using the Data Wallet (or any other EU Digital Identity Wallet) by either scanning the QR code or directly accessing the verification request on their mobile device, such as via a browser.

Request

Response

The presentation definition provided adheres to the specifications outlined in the DIF Presentation Exchange standard, as detailed here.

Step 4: Send and Receive Verifiable Presentation (Holder)

The holder wallet accepts (consents) to send the requested credentials.

Step 5: Send and Receive Verifiable Presentation (Verifier/Relying Party)

  • The Verfier (Relying Party) receives the requested credentials and can verify it. They may read the received credential by executing the Read Verification History API.
  • From the response received, the vpTokenResponse can be decoded using JWT Decoder.
  • From decoded response, the verifiableCredential inside the 'vp' can be further decoded to view the received credentials.

Try It Yourself (With Demo Video)

Watch the below demo to learn verify credential API and try it out yourselves: