light-mode-image
Learn
MATTR VII PlatformMessaging

Decrypt a message

Decrypts a provided message where the tenant manages the keys for the defined recipientDidUrl.

Analytics Events

MESSAGING_DECRYPT_STARTMESSAGING_DECRYPT_SUCCESSMESSAGING_DECRYPT_FAIL

Roles

adminissuer
POST/v1/messaging/decrypt
AuthorizationBearer <token>

In: header

Decryption parameters

jwestring | EncryptedMessage

The jwe object to be decrypted. It can be extracted from the jwe attribute of the response body you get when encrypting a message. Alternatively, you can use a jwe string using Base64 encoding method and following the JWE open-standard: BASE64URL(UTF8(JWE Protected Header)) || '.' || BASE64URL(JWE Encrypted Key) || '.' || BASE64URL(JWE Initialization Vector) || '.' || BASE64URL(JWE Ciphertext) || '.' || ASE64URL(JWE Authentication Tag)

Response Body

curl -X POST "https://example.vii.au01.mattr.global/v1/messaging/decrypt" \  -H "Content-Type: application/json" \  -d '{    "jwe": "eyJhbGciOiJFZERTQSIsImtpZCI6ImRpZDp3ZWI6bWF0dHIuZ2xvYmFsI0V5MkN2V2N5MzQifQ.eyJtZXNzYWdlIjoidGVzdCJ9.dMvOGkfbRrjUJL7XYYAp1UxoHlt8J0N5_vRRLpTEHtQ4s8lwnMd0lhg7HiZVfvEyzk54f6J0CgTV5oHzVscdAA"  }'
{
  "payload": "string",
  "senderDidUrl": "did:web:organization.com#2vcj3MjR4d",
  "senderPublicJwk": {},
  "recipientDidUrl": "did:key:z6MkgmEkNM32vyFeMXcQA7AfQDznu47qHCZpy2AYH2Dtdu1d"
}
{
  "code": "string",
  "message": "string",
  "details": [
    {
      "value": "string",
      "msg": "Invalid value",
      "param": "id",
      "location": "body"
    }
  ]
}

How would you rate this page?