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-12-05 UTC."],[[["Creates an add-on attachment under a post, requiring add-on permission to create attachments."],["Returns potential errors: `PERMISSION_DENIED`, `INVALID_ARGUMENT`, or `NOT_FOUND`."],["Utilizes the `POST` method with the URL: `https://classroom.googleapis.com/v1/courses/{courseId}/courseWork/{itemId}/addOnAttachments`."],["Requires `courseId` and `itemId` as path parameters, with optional `postId` (deprecated) and `addOnToken` as query parameters."],["Needs `https://www.googleapis.com/auth/classroom.addons.teacher` OAuth scope for authorization."]]],[]]