$connection
$connection : \Threema\MsgApi\Connection
$connection : \Threema\MsgApi\Connection
$cryptTool : \Threema\MsgApi\Tools\CryptTool
__construct(string $privateKey, \Threema\MsgApi\Connection $connection, \Threema\MsgApi\Tools\CryptTool $cryptTool = null)
| string | $privateKey | (binary) |
| \Threema\MsgApi\Connection | $connection | |
| \Threema\MsgApi\Tools\CryptTool | $cryptTool |
sendTextMessage(string $threemaId, string $text) : \Threema\MsgApi\Commands\Results\SendE2EResult
Crypt a text message and send it to the threemaId
| string | $threemaId | |
| string | $text |
sendImageMessage(string $threemaId, string $imagePath) : \Threema\MsgApi\Commands\Results\SendE2EResult
Crypt a image file, upload the blob and send the image message to the threemaId
| string | $threemaId | |
| string | $imagePath |
sendFileMessage(string $threemaId, string $filePath, null|string $thumbnailPath = null) : \Threema\MsgApi\Commands\Results\SendE2EResult
Crypt a file (and thumbnail if given), upload the blob and send it to the given threemaId
| string | $threemaId | |
| string | $filePath | |
| null|string | $thumbnailPath |
receiveMessage(string $threemaId, string $messageId, string $box, string $nonce, string|null $outputFolder = null, \Closure $downloadMessage = null) : \Threema\MsgApi\Helpers\ReceiveMessageResult
Encrypt a message and download the files of the message to the $outputFolder
| string | $threemaId | |
| string | $messageId | |
| string | $box | box as binary string |
| string | $nonce | nonce as binary string |
| string|null | $outputFolder | folder for storing the files |
| \Closure | $downloadMessage |
fetchPublicKeyAndCheckCapability(string $threemaId, \Closure $capabilityCheck = null) : string
Fetch a public key and check the capability of the threemaId
| string | $threemaId | |
| \Closure | $capabilityCheck |
Public key as binary
downloadFile(\Threema\MsgApi\Messages\ThreemaMessage $message, string $blobId, \Closure|null $downloadMessage = null) : null|\Threema\MsgApi\Commands\Results\DownloadFileResult
| \Threema\MsgApi\Messages\ThreemaMessage | $message | |
| string | $blobId | blob id as hex |
| \Closure|null | $downloadMessage |