Skip to main content

Submit a presentation

Learn how to present credentials.

The presentation workflow has four steps:

  1. Handle invitation

  2. Get proof request

  3. Get presentation definition

  4. Respond to the request

This page explains each step and how to complete them. Samples for the Desk API (for organizational wallets) and for the SDK (for mobile devices) are provided.

Presentation workflow

Handle invitation

The verifier will share an invitation URL, often encoded as a QR code. The URL is generated from the verification protocol; your system must support the verification protocol used to be able to parse the offer correctly.

info

Use the "Handle invitation" endpoint to parse the invitation URL:

curl -L -X POST '/api/interaction/v1/handle-invitation' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"url": "https://example.com/invitation"
}'

Transport array

If you have multiple transport protocols configured you can use this array to override the default protocol. For wallets, this is generally only the case for mobile devices.

Get proof request

curl -L '/api/proof-request/v1/{proofRequestId}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \

Get presentation definition

This function takes a proof request and searches your held credentials, returning those which are applicable to the request.

curl -L '/api/proof-request/v1/{proofRequestId}/presentation-definition' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \

Submit (or reject) proof

curl -L '/api/interaction/v1/presentation-submit' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"identifierId": "{{UUID-OF-IDENTIFIER}}",
"interactionId": "{{FROM-HANDLE-INVITATION}}",
"submitCredentials": {
"input_0": {
"credentialId": "{{CHOOSE-A-CREDENTIAL}}",
"submitClaims": [
"{{UUID-OF-CLAIM}}",
"{{UUID-OF-OTHER-CLAIM}}"
]
},
"input_1": {
"credentialId": "{{SECOND-CREDENTIAL}}",
"submitClaims": [
"{{UUID-OF-CLAIM}}"
]
},
}
}'

submitCredentials is a selection of the credentials and claims returned from presentation definition. The input_{{#}} value comes from requestGroups.requestedCredentials.id for the applicable credential.

Reject proof

curl -L -X POST '/api/interaction/v1/presentation-reject' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"interactionId":"{{FROM-HANDLE-INVITATION}}"
}'