From ea9d4dc2dc9660d35235fef21f032fe4646c9bea Mon Sep 17 00:00:00 2001 From: Joren Date: Sat, 16 May 2026 22:37:45 +0200 Subject: [PATCH] fix: use item.HTMLURL (module_item_redirect) not item.URL for ExternalUrl auth For ExternalUrl module items, the Canvas API returns url=null and html_url=.../module_item_redirect/. We were passing item.URL (empty) causing the session_token call to return no session_url. --- internal/canvas/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/canvas/client.go b/internal/canvas/client.go index 31c4bfd..4c7a9c8 100644 --- a/internal/canvas/client.go +++ b/internal/canvas/client.go @@ -240,7 +240,7 @@ func (c *Client) DownloadModules(courseRoot string) { indent := strings.Repeat(" ", len(subHeaderStack)+1) fmt.Printf("%s- Found direct video link: %s\n", indent, item.Title) - panopto.DownloadExternalPanoptoURL(c.HTTPClient, c.AccessToken, item.URL, item.ExternalURL, targetDir, item.Title) + panopto.DownloadExternalPanoptoURL(c.HTTPClient, c.AccessToken, item.HTMLURL, item.ExternalURL, targetDir, item.Title) } case "Page":