Is there a way to get a course identifier (id
, course object itself .etc) from an enrollment code with an HTTP request?
I don't see any way to do so in the classroom REST API documentation.
Similar to scripting a join screen, how do I convert an enrollment code obtained from a GoogleTeacher to a classroom id
which I can then use with an API call like GET https://classroom.googleapis.com/v1/courses/id
(Classroom.Courses.get()
)?
there might be no direct way to query courses
by the enrollmentCode
- but one can list
all courses to get their courseId
s and then use get
by courseId
, in order to compare the enrollmentCode
of that course
and return the room
, when the enrollmentCode
matches.
see the API documentation.