Create and offer credential

Send a credential offer of the specified credential definition to the specified connection.

Service Clients (SDKs)

This endpoint can be accessed using one of our service clients as follows.

For more information on how to use our service clients, see our Service Clients (SDKs) guide.

How Credential Offers Relate to Connections

This endpoints will can both create connectionless credential offers and send credentials offer to an existing connection. The connectionless credential offer includes all of the credential offer data within the offerData field. The offerUrl field can be encoded as a QR code to be scanned by the Trinsic wallet.

You can also use the Create Connection Endpoint to first create a connection and then offer a credential to it using the connection ID.

Each DIDComm connection is established to a trinsic-hosted wallet, and when a new message is sent, like a credential offer, the Trinsic Platform will send a webhook to your node app with the new event. You can read more about webhooks and the event types here:

String connectionId = null; // Can be null | <connection identifier>
Boolean automaticIssuance = false;
IDictionary<string, string> credentialValues = new Dictionary<String, String>() {
  {"Attribute A", "value"},
  {"Attribute B", "value"}
CredentialContract credential = await _credentialsClient.CreateCredentialAsync(new CredentialOfferParameters {
  DefinitionId = definitionId,
  ConnectionId = connectionId,
  AutomaticIssuance = automaticIssuance,
  CredentialValues = credentialValues
let definitionId = "<definition-id>" // Use a definition id from your definitions
let connectionId = null; // Can be null | <connection identifier>
let automaticIssuance = false;
let credentialValues = {
  "Attribute A": "value",
  "Attribute B": "value"
let credential = await credentialsClient.createCredential({
  definitionId: definitionId,
  connectionId: connectionId,
  automaticIssuance: automaticIssuance,
  credentialValues: credentialValues
connection_id = None  # Can be null | <connection identifier>
automatic_issuance = False
credential_values = {
  "Attribute A": "value",
  "Attribute B": "value"
credential = credentials_client.create_credential({
  "definitionId": definition_id,
  "connectionId": connection_id,
  "automaticIssuance": automatic_issuance,
  "credentialValues": credential_values
body =
body.definition_id = definition_id
body.connection_id = nil # Can be nil | <connection identifier>
body.automatic_issuance = false
body.credential_values = {
  'Attribute A' => 'value',
  'Attribute B' => 'value'
credential = credentials_client.create_credential(body)
Click Try It! to start a request and see the response here!