Skip to content

Read Message

Get a message given a transaction ID.

Request:

  • requestType is readMessage
  • transaction is the transaction ID of the message
  • secretPhrase is the secret passphrase of the account that received the message (optional)
  • sharedKey is the shared key used to decrypt the message (optional) (see Get Shared Key)
  • retrieve is true to retrieve pruned data from archival nodes (optional)
  • requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
  • requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)

Response:

  • messageIsPrunable (B) is true if there is a plain message and it is prunable, false if it is not prunable
  • message (S) is the plain message, if applicable
  • encryptedMessageIsPrunable (B) is true if there is an encrypted message and it is prunable, false if it is not prunable
  • decryptedMessage (S) is the decrypted message, if applicable and only if the provided secretPhrase belongs to either the sender or receiver of the transaction
  • decryptedMessageToSelf (S) is the decrypted message sent to self, if applicable and only if the provided secretPhrase belongs to the sender of transaction
  • lastBlock (S) is the last block ID on the blockchain (applies if requireBlock is provided but not requireLastBlock)
  • requestProcessingTime (N) is the API request processing time (in millisec)