User not authorized to perform that action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am getting an unauthorized error when attempting to view user page views while using a token generated from my admin account.
The error is: "user not authorized to perform that action"
The following API call produces the error:
curl https://<institution>.instructure.com/api/v1/users/:userid/page_views \
-X GET \
-H 'Authorization: Bearer :admin_token'
However, a call to "self" works:
curl https://<institution>.instructure.com/api/v1/users/self/page_views \
-X GET \
-H 'Authorization: Bearer :admin_token'
What are the permissions needed to view other users' page views?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I solved it. Was using our SIS ID for the user, instead of Canvas' 7-digit ID value. Rookie mistake.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Glad you figured it out and ignore my response. Your answer wasn't there when I started typing it.