Issue a Verifiable AnonCreds Credential, signed by a did:cheqd Decentralized Identifier (DID), using the ACA-Py API endpoints.
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.
Step 1: Create a Connection with Holder
Use any supported method to create a connection with the Holder of the credential. Automated out-of-band protocol is recommended.
1a: Issuer Creates Connection Invite
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.
Create a new connection invitation
post
Query parameters
auto_acceptbooleanOptional
Auto-accept connection (defaults to configuration)
create_unique_didbooleanOptional
Create unique DID for this invitation (default false)
multi_usebooleanOptional
Create invitation for multiple use (default false)
Body
acceptstring[]Optional
List of mime type in order of preference that should be use in responding to the message
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
Example: To issue a Faber College Graduate credential
goal_codestringOptional
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
Example: issue-vc
handshake_protocolsstring[]Optional
Handshake protocol
imageUrlstring · urlOptional
Optional image URL for out-of-band invitation
Example: http://192.168.56.101/img/logo.jpg
labelstringOptional
Optional label
Example: Bob
Responses
200Success
application/json
post
/out-of-band/receive-invitation
200Success
Parameters and Request Body
auto_accept
Set this to true
alias
Pass an alias for the connection
use_existing_connection
Set this to true
The request body should be the invitation value from the /create-invitation call by the Issuer.
Step 2: Prepare Credential Offer
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.
Send holder a credential offer, independent of any proposal
post
Body
auto_issuebooleanOptional
Whether to respond automatically to credential requests, creating and issuing requested credentials
auto_removebooleanOptional
Whether to remove the credential exchange record on completion (overrides --preserve-exchange-records configuration setting)
commentstringOptional
Human-readable comment
connection_idstringRequired
Connection identifier
Example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
replacement_idstringOptional
Optional identifier used to manage credential replacement
Example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
tracebooleanOptional
Record trace information, based on agent configuration
Responses
200Success
application/json
post
/issue-credential-2.0/send-offer
200Success
Step 3: Holder accepts credential offer
The Holder has to retrieve the credential exchange id, and call this API to accept the offer.