Hi,
I am a student working on a project that hopes to integrate Canva's API to make some tool for progress tracking in all courses. The problem I am running into at the moment is with viewing files and modules as a student. When I send a request I get the 401 code back which means I am not authorized. I was wondering why this would be the case as on my course websites I am able to see files and modules. My initial guess is that the response of that request would list all the files both published and unpublished and I am assuming that its the same for modules.
My question is; using the API is there a way I can get a list of published files and modules?
Let me be more specific. I am using Postman to query the API and yes I have gotten my bearer token and I am authorizing API access using the bearer token. In terms of API requests that I have gotten to work, I have gotten a list of all my courses using the GET api/v1/courses endpoint, my enrollments by using the GET api/v1/users/:user_id/enrollments and my user info with the endpoint that you specified earlier.
The issue comes from when I try to perform a GET api/v1/courses/:course_id/files or a GET /api/v1/courses/:course_id/modules. The resulting message is as follows:
{
"status": "unauthorized",
"errors": [
{
"message": "user not authorized to perform that action"
}
]
}
For additional context, I replace :course_id with a course ID from the following table i queried for enrollments (see the attached image).
Please let me know for any additional questions.
Thank you!