[ARCHIVED] Getting 401 when accessing API

Jump to solution
btb
Community Member

I'm a staff member at an institution that's comprised of three schools. I'm trying to write a simple python script to retrieve the current grades for a select group of students to save myself and others the time of doing it manually through the web application. My account has admin privileges for the sub account that holds the students I need the grades for but it does not have admin privileges for the main account that holds the sub account for the three schools. I've generated an access token from my settings area on the web app but when I try using it to access data through the live API, I get a 401. This is puzzling since I can access this exact data manually through the web app. I brought my problem to the top admin and when he generated an access token with his account, it worked fine. I've searched around for someone who's had the same problem as me but haven't come up with anything. Please let me know if you have any idea what the issue could be. Any help would be very much appreciated!

Labels (2)
0 Likes
1 Solution
btb
Community Member
Author

Thanks very much for your replies everyone. Since I can't access the user data directly, I eventually settled on grabbing the enrollments through the course objects. Works well but involves manually grabbing each student's course numbers at the start of the semester and storing them in a csv file. I may eventually do the latter part programmatically but am satisfied with it as is.

Thanks again!

View solution in original post