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.
Query parameters
Parameters
postId (deprecated)
string
Optional. Deprecated, use itemId instead.
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-09-04 UTC."],[[["Creates an add-on attachment under a post, requiring add-on permission to create attachments."],["Uses `POST` request to `https://classroom.googleapis.com/v1/courses/{courseId}/announcements/{itemId}/addOnAttachments` with path and query parameters."],["Requires `courseId`, `itemId` as path parameters and optionally accepts `postId`, `addOnToken` as query parameters."],["Request body should contain an `AddOnAttachment` object, and a successful response returns the created `AddOnAttachment`."],["Needs `https://www.googleapis.com/auth/classroom.addons.teacher` authorization scope for access."]]],[]]