The Instructure Community will enter a read-only state on November 22, 2025 as we prepare to migrate to our new Community platform in early December. Read our blog post for more info about this change.
Found this content helpful? Log in or sign up to leave a like!
Step to peproduce:
At this point the Canvas sends a LTI tool launch request to the tool provider, and one of the request parameters is the canvas user id ("custom_canvas_user_id").
And in the case of student view, this user id will be the "Test Student" user id not the staff's user id.
That on its own is not an issue, the issue is calling Canvas API GET /v1/users/{id} does not work on this user id. It returns 401 unauthorized even if the canvas token is from an Account Admin.
I have the following questions:
Also fun fact, if you open Canvas Live API in the same browser session as your canvas website, then somehow the API page is taking on the context of the Canvas website.
Ie. When the teacher enters the student view of a course, your Live API page is also entering that student view mode.
Meaning you can not query another course, you cant query any user, you can query current course but the enrollments return dummy students instead of real data.
This is even when the Canvas token you apply to the Live API page is not from the same user who log in to the Canvas website.
Solved! Go to Solution.
This issue has now been resolved.
I don't know whether this is reliable or not, and I wouldn't want to trust it in production code, but I have observed that Test Student ids are extraordinarily long, and contain letters, whereas real ids run around 7 digits. Here is a sample Test Student id: 9f275e8899d4ab23971aa940a98d31ff4f87b7cd
Another observation. When in Student View in the new ui, you can't view your profile, so it may be just that particular user endpoint that won't work.
This issue has now been resolved.
Community helpTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign inTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign in