GET api/v1/courses returns []

44 views
Skip to first unread message

Tobias Bonnesen

unread,
Feb 27, 2018, 5:06:06 AM2/27/18
to Canvas LMS API Users
Hello people,
I've just started playing around with the API, with the though of creating an app, but I'm having a bit of a problem. I've been to settings in my profile, and made an access token, but when I do a GET request to api/v1/courses it returns: " [] " - that is, no courses. Even though I'm enrolled to 4-5! I've also tried adding ?per_page= but that didn't help. Status is 200 OK and I've also successfully retrieved all my inbox messages, so it's only this I can't.
Any ideas?

Tobias Bonnesen

unread,
Feb 27, 2018, 6:28:57 AM2/27/18
to Canvas LMS API Users
I can add that the following GET request does work:
https://canvas.instructure.com/api/v1/users/self/enrollments

And weirdly enough a get request to https://canvas.instructure.com/api/v1/course/<id_of_course_i_have> returns I don't have permission to view it?
Reply all
Reply to author
Forward
0 new messages