For Developers

Download File

GET https://ed.link/api/v2/graph/classes/:class_id/files/:file_id/download

Download a specific File associated with a Class. This endpoint returns the raw file content as a stream.

Request Parameters

ParameterTypeDescription
class_idstringThe UUID of the desired Class.
file_idstringThe UUID of the desired File.

Sample Request

axios.get(`https://ed.link/api/v2/graph/classes/${class_id}/files/${file_id}/download`, {
    headers: {
        authorization: `Bearer ${integration_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."
        }
    ]
}
Due to elevated security risk of drive permissions required for Microsoft and Google, this endpoint will NOT work in the Graph API. It is only available in the User API, after setting up a custom client.

Supported Providers

  • blackboard
  • brightspace
  • canvas
  • google
  • schoology