Messaging API calls
Encrypt Message
Parameters
Enumerated Values
Messaging encrypt
ECDH-1PU+A256KWPossible values: Message has been encrypted, returning an encrypted DIDComm Message
Default response
Message failed to encrypt
Transaction limit reached or upgrade required to proceed
DID was not found
POST /messaging/encrypt HTTP/1.1
Host: api-testnet.truvera.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 102
{
"type": "text",
"payload": {},
"senderDid": "text",
"algorithm": "ECDH-1PU+A256KW",
"recipientDids": [
"text"
]
}{
"code": 1
}Decrypt Message
Parameters
Decrypts a JSON Web Message
Message has been decrypted, returning a DIDComm message
Default response
Message failed to decrypt
Transaction limit reached or upgrade required to proceed
DID was not found
POST /messaging/decrypt HTTP/1.1
Host: api-testnet.truvera.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 10
{
"jwe": {}
}{
"code": 1
}Signing Messages
Parameters
Signs a DIDComm message as a base64 encoded JWT
Message has been sent
Default response
Message failed to send
Transaction limit reached or upgrade required to proceed
DID was not found
POST /messaging/sign HTTP/1.1
Host: api-testnet.truvera.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 47
{
"payload": {},
"senderDid": "text",
"type": "text"
}{
"code": 1
}Verifying a Message
Parameters
Verifies a JWS in its compacted form
Message is verified
Default response
Message failed to verify
Transaction limit reached or upgrade required to proceed
DID was not found
POST /messaging/verify HTTP/1.1
Host: api-testnet.truvera.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 14
{
"jws": "text"
}{
"code": 1
}Send Message
Parameters
Sends a DIDComm message using our relay service and DID service endpoints, it also returns a URL for QR code scanning. Supports encrypted, plaintext and signed DIDComm messages. You can generate an encrypted DIDComm message by calling the /messaging/encrypt route
Message has been sent
Default response
Message failed to send
Transaction limit reached or upgrade required to proceed
DID was not found
POST /messaging/send HTTP/1.1
Host: api-testnet.truvera.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 26
{
"to": "text",
"message": {}
}{
"code": 1
}Last updated
Was this helpful?