Issue Credential
Issue conformant W3C Verifiable Credentials over REST API
Using the /credential/create
API, it is possible to issue Verifiable Credentials, signed by a cheqd DID, in a few clicks or lines of code.
Step 1: Set up your account
Make sure you have set up your account with cheqd Studio and are logged in, using our guide below:
Step 2: Create an Issuer DID
Before you can issue a Verifiable Credential, you need to create an Issuer DID which is used to sign the Credential payload. Use the API in the page below to create an Issuer DID:
(Optional) Step 3: Create a Subject DID
Again, before you issue a Verifiable Credential, you need to know to whom you are issuing it. If you need to create a Subject DID, you can take a look at the page here:
Create a Subject DID
Create an off-ledger did:key
or did:vda
Subject DID to receive a Verifiable Credential.
Setup Verida Wallet
Learn about setting up your Verida wallet to receive a did:vda
address.
Step 4: Compile your Credential body
Within the JSON object of the API request, you will need to input the issuer
and subject
information, as well as the attributes
which you want to issue in the Credential. You may also want to add additional fields such as a credentialSchema
.
Users have two options for compiling the Credential bodies and issuing Verifiable Credentials:
Filling out a simple form using the
application/x-www-url-form-encoded
option within an API client of your choice.Compiling a Credential body yourself using the
application/json
option within an API client of your choice.
Option 1. Choose from a few variables and we will compile the Credential body for you
This is the easiest way to issue Credentials and is recommended for users who are not overly familiar with compiling JSON objects.
Using the application/x-www-url-form-encoded
option, users are able to choose between the following variables and options to issue Verifiable Credentials:
Additional options for specifying credentialStatus bitstring index
Below are a set of examples of alternative input parameters for users to specify the bitstring index of the issued Credential. The bitstring index is where exactly the issued credential will map to within the Status List. This should be noted and stored by the issuer to keep a record of which issued credentials are active, revoked or suspended:
Ensure that the "statusPurpose"
and "statusListName"
is the same as the existing Status List on-ledger.
Option 2. Publish a JSON payload yourself
Instead of using simple form variables, you can issue a Verifiable Credential using a JSON payload with the application/json
option.
Request format
Below is an example of the request format for issuing a Verifiable Credential using a custom JSON payload, including some of the possible parameters:
Step 5: Issue a Credential using the API below
Execute the API below to issue a Verifiable Credential, signed by your issuer DID.
Alternatives
Below are a list of alternatives for using Credentials with cheqd support. Each offers a different set of protocols and underlying technical capabilities.
Veramo SDK Plugin
The Veramo SDK Plugin is an extension of the Veramo SDK, a JavaScript framework for Trusted Data, adding support for cheqd functionality.
Credo
Walt.id SSI Kit
t
Last updated