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.
Make sure you have set up your account with cheqd Studio and are logged in, using our guide below:
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:
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:
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.
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:
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.
Instead of using simple form variables, you can issue a Verifiable Credential using a JSON payload with the application/json
option.
Below is an example of the request format for issuing a Verifiable Credential using a custom JSON payload, including some of the possible parameters:
Execute the API below to issue a Verifiable Credential, signed by your issuer DID.
Below are a list of alternatives for using Credentials with cheqd support. Each offers a different set of protocols and underlying technical capabilities.
t
Set up your account
Set up your account with cheqd Studio and log in to start using the APIs.
Create an Issuer DID
Create a W3C conformant DID on cheqd using the did:cheqd
DID Method.
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.
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
Credo is an SDK which supports ZKCreds (AnonCreds) and regular Verifiable Credentials natively with cheqd support.
Walt.id SSI Kit
Walt.id SSI Kit is an SDK that supports the European Architecture and Reference Framework (ARF) standards for identity, with full cheqd support.
This endpoint issues a Verifiable Credential. As input it takes the list of issuerDid, subjectDid, attributes, and other parameters of the credential to be issued.
DID of the Verifiable Credential issuer. This needs to be a did:cheqd
DID.
"did:cheqd:testnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0"
DID of the Verifiable Credential holder/subject. This needs to be a did:key
DID.
"did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK"
JSON object containing the attributes to be included in the credential.
Optional properties to be included in the @context
property of the credential.
Optional properties to be included in the type
property of the credential.
Optional expiration date according to the <a href=https://www.w3.org/TR/vc-data-model/#expiration> VC Data Model specification.
"2023-06-08T13:49:28.000Z"
Format of the Verifiable Credential. Defaults to VC-JWT.
"jwt"
Optional credentialStatus
properties for VC revocation or suspension. Takes statusListName
and statusListPurpose
as inputs.
Terms of use can be utilized by an issuer or a holder to communicate the terms under which a verifiable credential was issued.
RefreshService property MUST be one or more refresh services that provides enough information to the recipient's software such that the recipient can refresh the verifiable credential.
Evidence property MUST be one or more evidence schemes providing enough information for a verifier to determine whether the evidence gathered by the issuer meets its confidence requirements for relying on the credential.
The request was successful.
"2023-06-08T13:49:28.000Z"
"did:cheqd:testnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0"
"did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK"
"https://resolver.cheqd.net/1.0/identifiers/did:cheqd:testnet:7c2b990c-3d05-4ebf-91af-f4f4d0091d2e?resourceName=cheqd-suspension-1&resourceType=StatusList2021Suspension#20"
20
"suspension"
"2023-06-08T13:49:28.000Z"
This endpoint issues a Verifiable Credential. As input it takes the list of issuerDid, subjectDid, attributes, and other parameters of the credential to be issued.
DID of the Verifiable Credential issuer. This needs to be a did:cheqd
DID.
"did:cheqd:testnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0"
DID of the Verifiable Credential holder/subject. This needs to be a did:key
DID.
"did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK"
JSON object containing the attributes to be included in the credential.
Optional properties to be included in the @context
property of the credential.
Optional properties to be included in the type
property of the credential.
Optional expiration date according to the <a href=https://www.w3.org/TR/vc-data-model/#expiration> VC Data Model specification.
"2023-06-08T13:49:28.000Z"
Format of the Verifiable Credential. Defaults to VC-JWT.
"jwt"
Optional credentialStatus
properties for VC revocation or suspension. Takes statusListName
and statusListPurpose
as inputs.
Terms of use can be utilized by an issuer or a holder to communicate the terms under which a verifiable credential was issued.
RefreshService property MUST be one or more refresh services that provides enough information to the recipient's software such that the recipient can refresh the verifiable credential.
Evidence property MUST be one or more evidence schemes providing enough information for a verifier to determine whether the evidence gathered by the issuer meets its confidence requirements for relying on the credential.
The request was successful.
"2023-06-08T13:49:28.000Z"
"did:cheqd:testnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0"
"did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK"
"https://resolver.cheqd.net/1.0/identifiers/did:cheqd:testnet:7c2b990c-3d05-4ebf-91af-f4f4d0091d2e?resourceName=cheqd-suspension-1&resourceType=StatusList2021Suspension#20"
20
"suspension"
"2023-06-08T13:49:28.000Z"