Think 2021: New tools have the developer ecosystem and IBM building together Learn more

Get started with IBM Digital Health Pass

How can you bring people back to physical locations such as the workplace or airports without compromising on safety protocols? And, how can you ensure that the information being shared is secure? IBM Digital Health Pass can help. Digital Health Pass is an open standards-based platform that allows the secure, privacy-preserving, and verifiable exchange of data between organizations and their patients, employees, customers, and citizens, to drive agile and responsive businesses. Data is exchanged as verifiable credentials that, in combination with sophisticated cryptographic and obfuscation techniques, makes data tamper-proof so that it can be trusted by all parties.

In this tutorial, learn about Digital Health Pass, and explore features like creating a schema and issuing credentials using the Digital Health Pass API, which can be integrated into different applications to build end-to-end solutions effectively.

Estimated time

It should take you approximately 45 minutes to complete this tutorial.

Prerequisites

  • Be registered for and have access to IBM Digital Health Pass
  • Have access to Digital Health Pass APIs, and have downloaded the Digital Health Pass Wallet and Digital Health Pass Verify mobile applications

Steps

  1. Authorize the user
  2. Choose a schema
  3. Issue a credential
  4. Verify a credential
  5. Manage credentials

Step 1. Authorize the user

  1. Log in to the Digital Health Pass API in the Swagger UI using your credentials, then click Execute.

    Login page

  2. Copy the access token (excluding the double quotation marks), and click Authorize.

    Access token screen

  3. Paste the access token in the Value field.

    Available authorizations

  4. Click Authorize, then Close. You are now authorized to make API calls.

    Entering available authorizations

Step 2. Choose a schema

Use the following steps to query existing schemas or create your own. To query existing schemas:

  1. Navigate to the schemas Manage schemas section in the Swagger UI, click GET /schemas Get schemas, then click Try it out.

    Schemas main page

  2. Update the Issuer ID field, and click Execute.

    Updating Issuer ID field

Upon successful execution of the query, you see the following message with the retrieved schema information. You can download this information to your local file system.

Retrieved schema

To create a new schema:

  1. Navigate to the schemas Manage schemas section in the Swagger UI, click POST /schemas Create schema, and click Try it out.

    Creating new schema

  2. Update the details in the text boxes, and click Execute. The server response should return with the code 200 to confirm successful execution.

    Updating schema details

The following images show a sample Temperature Scan schema.

Schema image 1 Schema image 2 Schema image 3

Step 3. Issue a credential

To issue a credential:

  1. Navigate to the credentials Manage credentials section in the Swagger UI, and click Try it out.

    Manage credentials page

  2. Update the fields such as the Issuer ID, Credential type (string or encoded), Output type (string or qrcode), and click Execute.

    Updating credential fields

The following image shows a sample temperature credential with a (string format).

Sample temperature credential with string format

The following image shows a sample temperature credential with a (qrcode format).

Sample temperature credential with qrcode

Step 4. Verify a credential

To verify a credential, your application must be able to read a credential (QR code or file) and verify it. Minimally, verification involves looking up the ledger to:

  1. Check that the Issuer DID is a valid and trusted one. (The issuer DID is in the credential.)
  2. Retrieve the DID document, which contains the public key used for verifying signatures.
  3. Retrieve the schema of the credential. (The schema DID is in the credential.)
  4. Check that the credential has not been revoked. (The credential DID is in the credential, and is in the revocation registry if it has been revoked.)

After you have all of this data in your application, you can run the verification logic. This can vary depending on your application requirements, but minimally requires:

  1. Checking that the credential is not expired (expiryDate in the credential).
  2. Checking that the credential is not revoked. (This is already done in the ledger look-up.)
  3. Checking the credential signature block (using PK retrieved from the ledger).
  4. Checking any application-specific logic, such as verifying the identity and checking field values.

A future tutorial will explain in more detail how verification works, including providing code samples. To quickly get started, you can download the IBM Digital Health Pass Verify app from the Apple App Store. The app lets you scan a QR Code, then verifies the credential. The demo video in the next section shows how the Digital Health Pass Verify app works.

Step 5. Manage credentials

If you want to build a wallet directly into your existing mobile application, then there are a few things that you must consider:

  1. Secure storage of the wallet data
  2. Loading a credential into a wallet, such as scanning a QR Code, and performing verification before loading it
  3. Providing a credential viewer so that the holder can view the data in the credential
  4. Generating a QR Code to let the holder share the credential with a third party

A future tutorial will explain in more detail how you can integrate credentials into existing mobile applications. To quickly get started, you can download the IBM Digital Health Pass Wallet app from the Apple App Store. The app lets you scan a QR Code to load a credential into your wallet, verifies the credential, saves it in your wallet, lets you view the details, and generates a QR Code to share with a third party.

The following video shows how the Digital Health Pass Wallet app works.

Summary

In this tutorial, you learned about IBM Digital Health Pass and also explored features such as creating schemas and issuing credentials using the Digital Health Pass API, which can be integrated into different applications to build end-to-end solutions effectively. If you have questions, look at the FAQs to get more details.