b24_disk_file_content
Download a Bitrix24 Disk file's content as base64. Resolves the download URL server-side to enforce size limits and maintain portal WAF visibility.
Instructions
Download a Disk file's content and return it as base64.
Resolves DOWNLOAD_URL via disk.file.get, then fetches the bytes server-side (so the portal WAF sees the request, not your client). Guarded by max_size_mb.
Returns: {"id","name","size","content_type","base64"} or an error envelope.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_id | Yes | Disk file id to download. | |
| max_size_mb | No | Refuse to download files larger than this (default 10 MB) to protect the context window. | |
| webhook_url | No | Override the default incoming webhook for this call (https://<portal>/rest/<user_id>/<token>/). If omitted, uses personal_webhook, then the X-B24-Webhook HTTP header, then the BITRIX_WEBHOOK_URL env default. | |
| personal_webhook | No | Act as a specific user (their personal incoming webhook). Takes precedence over webhook_url. Required to write to the portal under that user's permissions. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |