Preview or download uploaded files previously uploaded via the Upload File API. Files can only be accessed if they belong to messages within the requesting application.
API Key authentication. For all API requests, include your API Key in the Authorization HTTP Header, prefixed with Bearer. Example: Authorization: Bearer {API_KEY}. Strongly recommend storing your API Key on the server-side, not shared or stored on the client-side, to avoid possible API-Key leakage that can lead to serious consequences.
The unique identifier of the file to preview, obtained from the Upload File API response.
If true, forces the file to download as an attachment instead of previewing in browser.
User identifier, used for end-user context.
Returns the raw file content. The Content-Type header is set to the file's MIME type. If as_attachment is true, the file is returned as a download with Content-Disposition: attachment.
The response is of type file.