API call : get attestations in my wallet

Here we describe how to get with API information about existing attestations

Now, create your second request. You will request to get the information from the attestation created previously via the UI

  • Select your collection and right-click. In the list, select add request

The right panel displays a new interface

  • Replace the name « New Request » with a relevant name regarding the request you are creating. For example « List of Accepted Attestations »

  • Keep GET because you are requesting data from the service

  • In the URL field, replace by {{Base_URL}}/attestations

When you send the request, {{Base_URL}} will be automatically replaced by the value you have defined previously in the Environment

  • In the Params tab, create a Key with the name « deliveryState », and set the Value « accepted »

If you want to see the attestation received and not yet accepted, replace "accepted" with "received"

  • Save the request

  • Click on Send button

Here is the response from the service:

[
    {
        "id": "8fd4cf4a-5ef5-4e56-8fb9-c87f8465df56",
        "source": "Archipels",
        "issuanceDate": "2024-07-15T16:52:15.128Z",
        "status": "valid",
        "deliveryState": "accepted",
        "expirationDate": "",
        "attributes": {
            "emailAddress": "[email protected]"
        },
        "schema": {
            "icon": "https://connect-prod.s3.fr-par.scw.cloud/icons/attestations/wallet/email.svg",
            "did": "7yrC9GegTsAAHz5Qc1CJpq:2:Email attestation:1.0",
            "name": "Email attestation"
        },
        "provider": {
            "name": "aries"
        },
        "issuer": {
            "did": "7yrC9GegTsAAHz5Qc1CJpq"
        }
    }
]

You notice you get the same information displayed in your wallet from the web interface and some extra like the attestation ID and schema did

Dernière mise à jour

Cet article vous a-t-il été utile ?