/api/v1/users/:user_id/files/quota UNAUTHORIZED
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2016
05:32 AM
I am trying to use
/api/v1/users/:user_id/files/quota
documented here Canvas LMS REST API Documentation
F.ex. https://ikt.instructure.com/api/v1/users/312/files/quota
Even when I am logged in as an administrator, I get "while(1);{"status":"unauthorized","errors":[{"message":"user not authorized to perform that action"}]}"
My plan was to get an overview of the quota used by all the students to see if we should increase it.
Solved! Go to Solution.
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2016
07:03 AM
@erlend_thune it seems you have two options here:
- Implement OAuth2 and request a token on the users behalf
- Impersonate the user
If this is an interal report, Masquerading would likely be the easiest approach.
Your syntax for the call would look like this:
/api/v1/users/:user_id/files/quota?as_user_id=:user_id
Let me know if this helps.