Using the API and a admin token, we want to start a complete a quiz on behalf of another user, like any other masquerade mechanism.
Doing a post like this
POST https://utu.instructure.com/api/v1/courses/427/quizzes/120840000000001534/submissions?as_user_id=1519
In where the 1519 is an student and has the quiz assigned, we got
{
"errors": "Invalid as_user_id"
}
So there's no way to complete a quiz through the API on behalf of an specific user
https://developerdocs.instructure.com/services/canvas/basics/file.masquerading