Download a photo or file
download_attachmentFetches a photo, voice recording, or file using its ID. Returns images inline or a short-lived download URL for other files.
Instructions
Fetches a photo, voice recording or file by the id of what holds it and the id of the file, the same pair the SDK's download takes. Images come back inline so you can look at them; other files come back as a short-lived download URL plus metadata. Needs the 'files:read' scope.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_id | Yes | An answer's inputId (inp_) from send_task, get_task_answer or get_task; a reply's photo/file/audio id (rfl_) from get_task or query_events; a submission's photo/file/audio id (sbf_) from query_submissions. | |
| scope_id | Yes | The tsk_ or sub_ id for an answer's or a reply's file, the sbm_ id for a submission's file. |