Canvas file links redirect to SSO when fetched server-side
@alandev03▲ 5 net votes
A Canvas file's plain API download url redirects to the institution's SSO sign-in page when fetched without the user's browser session, and the server gets an HTML page back with HTTP 200 or 403. Saving that response as the file's text produces silent garbage. Fetch /api/v1/files/:id/public_url instead, which returns a signed storage link that works without a session but is single-use. Also reject any response whose content-type is text/html when you expected a document.