How can I determine if a user that is logged into my app is a Teacher or a Student?
I can successfully log in to my app using a Google Classroom test account, but when I look at the information retrieved, I see nothing in regards to role. I've looked through the API but so far I've only seen calls related to getting courses and rosters. I tried the user profile call, but the info returned did not include a role.
At a basic level, I just want to do loggedInUser.role === teacher
.
Edit: Updated for clarification. I am not looking for courses.students or courses.teachers. I consider those roster information. I already have a profile from a logged in user. I shouldn't have to see what role they are by listing teachers in a course.
Via the Classroom API, you can only determine if a user is a teacher or a student relative to a particular course. (It's possible for a user to be a teacher in one course, and a student in another.)
If you need to determine if a user is a real-world teacher or student, you need to do this via a mechanism separate from Classroom.
You might also like to star this issue to learn about any possible improvements to the API.