[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-08-04 (世界標準時間)。"],[],[],null,["The **Attachment Discovery iframe** is the initial view shown to a teacher when\nopening an add-on during the creation of a\nClassroom task. An\n**attachment** is the content or activity that you intend for students to\ninteract with.\n\nFrom within a Classroom course, a teacher creates a new post (for\nexample, an assignment, announcement, or question) and selects an\nadd-on from the add-on\ndrop-down list (Figure 1).\n\n**Figure 1.** View of an assignment\ncreation including the possible add-on options a\nteacher can attach.\n\nOnce a teacher selects an add-on,\nClassroom creates an Attachment Discovery iframe and loads the\nadd-on's launch URL. Any relevant [iframe query\nparameters](/workspace/classroom/add-ons/developer-guides/iframes) are passed to the launch URL (Figure 2).\n\n**Figure 2.** An example of an **attachment discovery** UI in an iframe.\n\nThink of the Attachment Discovery view as the landing page for teachers in your\nadd-on. Typically, the teacher uses the partner's web\napplication within the iframe to select content to attach to their stream item.\nThe add-on application might restrict which content is\nshown depending on whether the stream item is an announcement, assignment, or\ncourse material. The add-on application then makes\nClassroom API calls to create and attach the attachment to the\nassignment.\n\nWhen the teacher is finished selecting and creating attachments, the\nadd-on sends a `postMessage` payload requesting the\niframe to be closed. The iframe closes and the teacher then sees the\nattachments, which they might then choose to preview or remove from the\nassignment (Figure 3). The teacher completes the creation flow by assigning the\nstream item to their students.\n\n**Figure 3.** View of an assignment creation with three activity-type\nadd-on attachments.\n\nUser experience considerations\n\n- On initial opening, the add-on must prompt the teacher to sign in.\n- Google single sign-on is required for all Classroom API calls. If your product has a separate login system, you must link accounts.\n- A teacher must be able to preview an attachment within the iframe before making their final selection.\n- A teacher should be able to search for, or browse through, attachable content.\n- The add-on may provide a variety of views such as recent content, my content, and filter by learning skills.\n- The add-on must provide an ability to create a new attachable item from within the iframe.\n\nSee the Classroom add-on [requirements checklist](/workspace/classroom/add-ons/requirements) for more details\non user experience requirements.\n\nLicensing status\n\nIf your add-on requires a license to your product, a\nclear message should be shown to explain how a teacher without a license can\nremedy the situation. Consider also hiding or disabling content that's not\navailable to a teacher due to licensing restrictions."]]