Identifier of the Announcement, CourseWork, or CourseWorkMaterial under which to create the attachment. This field is required, but is not marked as such while we are migrating from postId.
addOnToken
string
Optional. Token that authorizes the request.
The token is passed as a query parameter when the user is redirected from Classroom to the add-on's URL.
This authorization token is required for in-Classroom attachment creation but optional for partner-first attachment creation. Returns an error if not provided for partner-first attachment creation and the developer projects that created the attachment and its parent stream item do not match.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-12-05 UTC."],[[["This method is deprecated and you should use `course.announcements.addOnAttachments`, `course.courseWork.addOnAttachments`, or `course.courseWorkMaterials.addOnAttachments` instead."],["It creates an add-on attachment under a post, requiring add-on permission to create new attachments."],["The request body requires an `AddOnAttachment` object and the response, if successful, will contain the newly created `AddOnAttachment`."],["It needs the `https://www.googleapis.com/auth/classroom.addons.teacher` OAuth scope for authorization."],["Potential errors include `PERMISSION_DENIED`, `INVALID_ARGUMENT`, and `NOT_FOUND`."]]],[]]