Issue a Verifiable Credential
Last updated
Was this helpful?
Last updated
Was this helpful?
Using the /issue-credential-2.0
API endpoints, it is possible to issue Verifiable Credentials, signed by a cheqd DID, in a few clicks or lines of code. By following the following steps, you can effectively issue verifiable credentials using ACA-Py integrated with the cheqd ecosystem.
Use any supported method to create a connection with the Holder of the credential. Automated out-of-band protocol is recommended.
The Issuer agent will create a new connection invite for the Holder. This is needed to securely communicate between the Issuer and the Holder agents.
For automated acceptance, pass the following parameters:
A simple request body is below:
The above request will have an invitation
in the response. Holder will have to copy that inivitation and pass in the body of the following API call.
The request body should be the invitation
value from the /create-invitation
call by the Issuer.
Generate a credential offer using the /issue-credential-2.0/send-offer
API. This offer is sent to the holder, informing them about the available credential and its attributes.
The Holder has to retrieve the credential exchange id, and call this API to accept the offer.
Once the credential request is received and validated, issue the credential using the /issue-credential-2.0/records/<exchange-id>/issue
API endpoint.
The Holder has to store the issued credential into their wallet using the following API.
List of mime type in order of preference that should be use in responding to the message
["didcomm/aip1","didcomm/aip2;env=rfc19"]
Alias for connection
"Barry"
Optional invitation attachments
A self-attested string that the receiver may want to display to the user about the context-specific goal of the out-of-band message
"To issue a Faber College Graduate credential"
A self-attested code the receiver may want to display to the user or use in automatically deciding what to do with the out-of-band message
"issue-vc"
Identifier for active mediation record to be used
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
Optional metadata to attach to the connection created with the invitation
Label for connection invitation
"Invitation to Barry"
OOB protocol version
"1.1"
DID to use in invitation
"did:example:123"
DID method to use in invitation
"did:peer:2"
Whether to use public DID in invitation
false
Time of record creation
"2021-12-31T23:59:59Z"
^\d{4}-\d\d-\d\d[T ]\d\d:\d\d(?:\:(?:\d\d(?:\.\d{1,6})?))?(?:[+-]\d\d:?\d\d|Z|)$
Invitation message identifier
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
Out of band invitation message
Invitation record identifier
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
Invitation message URL
"https://example.com/endpoint?c_i=eyJAdHlwZSI6ICIuLi4iLCAiLi4uIjogIi4uLiJ9XX0="
Out of band record identifier
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
Out of band message exchange state
"await_response"
Record trace information, based on agent configuration
Time of last record update
"2021-12-31T23:59:59Z"
^\d{4}-\d\d-\d\d[T ]\d\d:\d\d(?:\:(?:\d\d(?:\.\d{1,6})?))?(?:[+-]\d\d:?\d\d|Z|)$
Message identifier
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
Message type
"https://didcomm.org/my-family/1.0/my-message-type"
List of mime type in order of preference
["didcomm/aip1","didcomm/aip2;env=rfc19"]
A self-attested string that the receiver may want to display to the user about the context-specific goal of the out-of-band message
"To issue a Faber College Graduate credential"
A self-attested code the receiver may want to display to the user or use in automatically deciding what to do with the out-of-band message
"issue-vc"
Optional image URL for out-of-band invitation
"http://192.168.56.101/img/logo.jpg"
Optional label
"Bob"
Optional request attachment
[{"did":"WgWxqztrNooG92RXvxSTWv","id":"string","recipientKeys":["did:key:z6MkpTHR8VNsBxYAAWHut2Geadd9jSwuBV8xRoAnwWsdvktH"],"routingKeys":["did:key:z6MkpTHR8VNsBxYAAWHut2Geadd9jSwuBV8xRoAnwWsdvktH"],"serviceEndpoint":"http://192.168.56.101:8020","type":"string"},"did:sov:WgWxqztrNooG92RXvxSTWv"]
Connection record identifier
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
Connection record identifier
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
Time of record creation
"2021-12-31T23:59:59Z"
^\d{4}-\d\d-\d\d[T ]\d\d:\d\d(?:\:(?:\d\d(?:\.\d{1,6})?))?(?:[+-]\d\d:?\d\d|Z|)$
Invitation message identifier
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
Out of band invitation message
Allow for multiple uses of the oob invitation
true
Oob record identifier
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
Recipient key used for oob invitation
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
OOB Role
"receiver"
Out of band message exchange state
"await-response"
Record trace information, based on agent configuration
Time of last record update
"2021-12-31T23:59:59Z"
^\d{4}-\d\d-\d\d[T ]\d\d:\d\d(?:\:(?:\d\d(?:\.\d{1,6})?))?(?:[+-]\d\d:?\d\d|Z|)$
Whether to respond automatically to credential requests, creating and issuing requested credentials
Whether to remove the credential exchange record on completion (overrides --preserve-exchange-records configuration setting)
Human-readable comment
Connection identifier
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
Credential specification criteria by format
Optional identifier used to manage credential replacement
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
Record trace information, based on agent configuration
Issuer choice to issue to request in this credential exchange
false
Holder choice to accept offer in this credential exchange
false
Issuer choice to remove this credential exchange record when complete
false
Attachment content by format for proposal, offer, request, and issue
Connection identifier
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
Time of record creation
"2021-12-31T23:59:59Z"
^\d{4}-\d\d-\d\d[T ]\d\d:\d\d(?:\:(?:\d\d(?:\.\d{1,6})?))?(?:[+-]\d\d:?\d\d|Z|)$
Credential exchange identifier
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
Serialized credential issue message
Credential offer message
Credential preview from credential proposal
Credential proposal message
Serialized credential request message
Error message
"The front fell off"
Issue-credential exchange initiator: self or external
"self"
Parent thread identifier
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
Issue-credential exchange role: holder or issuer
"issuer"
Issue-credential exchange state
"done"
Thread identifier
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
Record trace information, based on agent configuration
Time of last record update
"2021-12-31T23:59:59Z"
^\d{4}-\d\d-\d\d[T ]\d\d:\d\d(?:\:(?:\d\d(?:\.\d{1,6})?))?(?:[+-]\d\d:?\d\d|Z|)$
Credential exchange identifier
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
Whether to remove the credential exchange record on completion (overrides --preserve-exchange-records configuration setting)
Issuer choice to issue to request in this credential exchange
false
Holder choice to accept offer in this credential exchange
false
Issuer choice to remove this credential exchange record when complete
false
Connection identifier
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
Time of record creation
"2021-12-31T23:59:59Z"
^\d{4}-\d\d-\d\d[T ]\d\d:\d\d(?:\:(?:\d\d(?:\.\d{1,6})?))?(?:[+-]\d\d:?\d\d|Z|)$
Credential as stored
Credential definition identifier
"WgWxqztrNooG92RXvxSTWv:3:CL:20:tag"
^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+)):(.+)?$
Credential exchange identifier
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
Credential identifier
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
(Indy) credential offer
Credential offer message
Credential proposal message
(Indy) credential request
(Indy) credential request metadata
Error message
"Credential definition identifier is not set in proposal"
Issue-credential exchange initiator: self or external
"self"
Parent thread identifier
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
Credential as received, prior to storage in holder wallet
Revocation registry identifier
Credential identifier within revocation registry
Issue-credential exchange role: holder or issuer
"issuer"
Schema identifier
"WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0"
^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+$
Issue-credential exchange state
"credential_acked"
Thread identifier
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
Record trace information, based on agent configuration
Time of last record update
"2021-12-31T23:59:59Z"
^\d{4}-\d\d-\d\d[T ]\d\d:\d\d(?:\:(?:\d\d(?:\.\d{1,6})?))?(?:[+-]\d\d:?\d\d|Z|)$
Credential exchange identifier
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
Human-readable comment
Credential exchange record
Credential exchange identifier
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
Credential exchange record