AnsweredAssumed Answered

REST API unauthorized file attachment in assignment comments

Question asked by Michael Tsikerdekis on Nov 17, 2017
Latest reply on Mar 28, 2018 by

I use REST API to upload a file in a courses public directory as the instructor.

I then want to use that fileid and attach that file as a comment for an assignment to a student.

I use:

replacing the values with the appropriate numbers

and then in the payload: 

comment[file_ids][]: filenumber

(authorization token is included in the header)


I keep getting a message that says that I am not authorized to do that action. But the file is accessible and open to the Files section on canvas for all students. Shouldn't I be able to attach it based on its id?