download_file
Download a Canvas file by ID, returning readable text for text files and base64 for binary files. Files over 10 MB are rejected.
Instructions
Download the content of a Canvas file by ID. Text files (plain text, HTML, JSON, XML, JavaScript) are returned as readable text. Binary files (images, PDFs, etc.) are returned as base64-encoded data. Files larger than 10 MB are refused.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_id | Yes | The Canvas file ID | |
| course_id | No | Optional Canvas course ID to scope the file lookup |