Celebrate Excellence in Education: Nominate Outstanding Educators by April 15!
Found this content helpful? Log in or sign up to leave a like!
I am a complete beginner in using APIs, but I am trying to learn. I was trying to access the student activity analytics for a course I'm teaching, but I keep getting a 401 code as a return.
I have tried adding the token as part of the URL request:
https://lalala.instructure.com/api/v1/courses/XXXX/analytics/activity?access_token=1XX0~9L1Im4w8DXXX...
And adding the header as a separate variable in the GET request
header <- "{Authorization : Bearer 1XXX0~9L1Im4w8XXXX}"
GET(url = url, header = head)
I am at a loss. Is it that analytics can only be accessed by certain users (meaning I'd have to ask for additional permissions from my IT department), or am I doing something wrong here?
Solved! Go to Solution.
What role do you have in the course?
If you are a teacher you should be able to access that endpoint.
Does it work if you log in using your browser and then go to (no token required):
https://lalala.instructure.com/api/v1/courses/XXXX/analytics/activity
What role do you have in the course?
If you are a teacher you should be able to access that endpoint.
Does it work if you log in using your browser and then go to (no token required):
https://lalala.instructure.com/api/v1/courses/XXXX/analytics/activity
No, I'm still getting access denied. I've checked my role in that class and am enrolled as "virtual teacher". Does that come with less permissions than regular teacher?
I checked on a colleague's account (he's enrolled as physical teacher) and he does have access, so it's a problem with the permissions given to "virtual teachers". Oh, well. Time to talk to IT.
Thank you very much!
To participate in the Instructure Community, you need to sign up or log in:
Sign In