These docs are for v1.9. Click to read the latest docs for v2.1.

Fetch Message using ID

Before you begin

Fetch a dMessage by providing its ID and retrieve associated information such as a digital passport's receiver, if it has been read, and the content.

Let's start ๐Ÿš€

To fetch the dMessage information, use https://custody.arianee.com/{{client}}/{{network}}/messages/get.

InputMandatoryTypeDescription
idโœ…NumberdMessage identification number.
protocolNameโœ…StringProtocol on which the dMessage and its receiver have been minted.
Dig deeper into Arianee Protocols.
{
    "id": "617768167",
    "protocolName": "testnet"
}

Example:

curl --request POST \
     --url https://test.arianee.com/client/testnet/messages/get \
     --header 'accept: application/json; charset=utf-8' \
     --header 'authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVC...' \
     --header 'content-type: application/json' \
     --data '
{
  "id": "617768167",
  "protocolName": "testnet"
}
'

Result:

httpCodeDescription
200The dMessage's information and content are returned.
400The body of the request may be wrong.
500Error server.
{
    "data": {
        "id": "617768167",
        "certificateId": "287574096",
        "content": {
            "$schema": "https://cert.arianee.org/version1/ArianeeMessage-i18n.json",
            "language": "en-US",
            "title": "Welcome to Arianee NFTs",
            "content": " Test automessage 25/04 15:38"
        },
        "rawContent": {
            "$schema": "https://cert.arianee.org/version1/ArianeeMessage-i18n.json",
            "language": "en-US",
            "title": "Welcome to Arianee NFTs",
            "content": " Test automessage 25/04 15:38"
        },
        "imprint": "TODO",
        "isRead": true,
        "protocol": {
            "name": "testnet",
            "chainId": 77
        },
        "receiver": "0xa45d9dacbea470cf93e8454aca5eca4e62fb5fcf",
        "sender": "0x57f5111a7e997a7ba63cc8976c92decbd86c1b08",
        "timestamp": 1686817705
    }
}
{
    "errors": [
        {
            "type": "field",
            "msg": "Invalid value",
            "path": "id",
            "location": "body"
        },
        {
            "type": "field",
            "msg": "id parameter is required and must be a string",
            "path": "id",
            "location": "body"
        },
        {
            "type": "field",
            "msg": "Invalid value",
            "path": "protocolName",
            "location": "body"
        },
        {
            "type": "field",
            "msg": "protocolName parameter is required and must be a string",
            "path": "protocolName",
            "location": "body"
        }
    ]
}