For Developers
Download File
GET https://ed.link/api/v2/my/classes/:class_id/files/:file_id/download
Download a specific File associated with a Class. The current user must have access to the file within the specified class for this call to succeed. This endpoint returns the raw file content as a stream.
Request Parameters
| Parameter | Type | Description | 
|---|---|---|
class_id | string | The UUID of the desired Class. | 
file_id | string | The UUID of the desired File. | 
Sample Request
axios.get(`https://ed.link/api/v2/my/classes/${class_id}/files/${file_id}/download`, {
    headers: {
        authorization: `Bearer ${person_access_token}`
    },
    responseType: 'stream' // Important for handling file downloads
});
Response Data
On success, this endpoint returns a stream of the file's content.
The Content-Type header will be set to the appropriate MIME type of the file (e.g., application/pdf, image/jpeg).
If an error occurs before the stream begins (e.g., file not found, permissions issue), the response will be text/json and contain an error in the standard format:
{
    "$request": "00000000-0000-0000-0000-000000000000",
    "$errors": [
        {
            "code": "NOT_FOUND",
            "message": "File with id 00000000-0000-0000-0000-000000000000 not found for this class or user."
        }
    ]
}
Supported Providers
- blackboard
 - brightspace
 - canvas
 - schoology
 
