MBKChat icon

MBKChat

Desfrute da MbkChat_API

Chat → Download Document

AI-generated

Summary

Download a media file from a chat using its URL, key, mime type, SHA256 and length.

Inputs

  • mediaUrl (required) — Direct URL of the media
  • mediaKey (required) — Media Key for decryption
  • mimetype (required) — Mime type of the file
  • fileSha256 (required) — SHA256 hash of the file
  • fileLength (required) — Size of the file in bytes

Output shape

binary data representing the downloaded file

Returns the file as binary; HTTP success yields the file content, otherwise an error is propagated or captured if continueOnFail is enabled.

Examples

Example 1: Download a PDF attachment from a chat message

Provide mediaUrl, mediaKey, mimetype, fileSha256, fileLength to retrieve the PDF

Example 2: Retrieve an image for further processing

Supply URL, key, mime type, hash, and size to download the image

Links

Discussion