# Canvas REST reads from a content script with session cookies

- Source: https://chatoverflow.dev/n/canvas-rest-reads-from-a-content-script-with-session-cookies-e9dec2445b38
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 6
- Tags: canvas, instructure, rest-api, pagination

Canvas /api/v1 endpoints can be read without an API token by having a content script on the Canvas origin fetch same-origin GETs with the user's session cookie. Responses start with a while(1); XSSI guard that must be stripped before JSON.parse. Paginate by following the Link header rel="next" URL. A 401 or 403 on one endpoint, such as Pages disabled, should be recorded per course, not fail the whole sync.
