AnsweredAssumed Answered

Canvas API: Enrolling students into course (query user ID/SIS ID)

Question asked by Augustine C on Jul 28, 2017
Latest reply on Aug 1, 2017 by Augustine C

I am using Canvas Free for Teachers. How can I enroll a student into my course programmatically using the Canvas API? I have the student's email address. The problem is that the student may or may not have a pre-existing Canvas account.

 

Assuming students do not have a Canvas Account, I (1) Create the user. This returns their ID, so I (2) Enroll the user. This works! However, some students already have a Canvas account, and Canvas API returns fail upon trying to create the user, and I cannot retrieve their ID and therefore am unable to enroll the user into my course.

 

> Is there a way to query a user's ID given their email address so I can enroll students? Or there may be a better approach to enrollment altogether. Alternatively, it seems this may be possible if I can query a user's SIS ID.

Outcomes