“课堂分享”按钮的集成最为简单。您在 Web 应用中嵌入脚本。该脚本会生成一个按钮,用户点击该按钮即可创建 Google 课堂动态项。不过,您的应用在创建这些数据流项后将无法访问这些数据流项,也无法访问任何其他 Google 课堂数据。
CourseWork API 和 Google 课堂插件路径要求您的 Web 应用使用 Google 课堂 API 请求直接控制信息流项及其内容。您的应用会保留对通过任一路径创建的直播内容或其他资源的访问权限。您还可以请求用户授予权限,以访问其他 Google 课堂数据。不过,您需要负责托管、测试和维护与 Google 交互的所有代码。
Google 课堂插件可为您的产品提供最佳用户体验和可被发现的机会。
支持哪些用户历程?
每种集成途径都会提供不同的用户体验,以及对 Google 课堂资源的不同访问权限。请参阅以下用户体验历程矩阵,比较这三条路径。
[null,null,["最后更新时间 (UTC):2025-08-01。"],[],[],null,["# Choose an integration path\n\nThis guide introduces the options to connect your service or application with\nGoogle Classroom. Select one of these paths to make your content available to\nusers within Classroom [stream items](/workspace/classroom/guides/key-concepts/api-structure#stream_items).\n| **Important:** This page is most relevant to publishers of learning content. If you are a domain administrator, school professional, or want to programmatically manage Classroom or Google Workspace data for an institution, consider the recommended solutions to [Modify Google Classroom resources](/workspace/classroom/guides/get-started#manage-resources).\n\nIntegration options\n-------------------\n\nThere are three ways to connect your learning materials to Google Classroom:\n\n1. Embed [Classroom Share](/workspace/classroom/guides/sharebutton) buttons in your product\n2. Use [`CourseWork` API](/workspace/classroom/guides/coursework-integration) to create and manage stream items with hyperlinks to your product\n3. Build a [Classroom add-on](/workspace/classroom/add-ons) to to let users discover and access your content within Google Classroom\n\nClassroom Share buttons are the least complex integration. You\nembed a script in your web application. The script generates a button, which\nusers click to create Classroom stream items. However, your\napplication can't access these stream items after creation, nor access any other\nClassroom data.\n\nThe `CourseWork` API and Classroom add-on paths require your web\napplication to use Classroom API requests to directly control stream\nitems and their contents. Your application retains access to stream items or\nother resources created by either path. You can also [request user permission](/workspace/classroom/guides/auth)\nfor access to other Classroom data. However, you are responsible\nfor hosting, testing, and maintaining all code that interacts with Google.\n\nClassroom add-ons offer the best user experience and\ndiscoverability opportunities for your product.\n\nWhich user journeys are supported?\n----------------------------------\n\nEach integration path provides different user experience and access to\nClassroom resources. See the following matrix of user journeys to\ncompare the three paths.\n\nThe icons in the following table indicate whether the user journey is\nfully supported,\nnot supported, or\nwarning **supported with caveats** . Click any warning\nto see clarifying information. \n\n| Journey | Classroom Share buttons | CourseWork API | Classroom Add-on |\n|------------------------------------------------------------------------------------|-------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------|\n| Users provide OAuth consent to my application | | | |\n| I can view Classroom resources associated with a user, such as rosters and courses | | | |\n| I can create coursework that links to my content | | | |\n| I can modify coursework that I've created | | | |\n| I can modify coursework that users create | | | |\n| I can set grades for student submissions | | warning You can only set grades for coursework that you create programmatically. You can't set grades on coursework created by teachers in the Classroom UI. [Continue](#which_user_journeys_are_supported) | |\n| I can access the attachments on student submissions | | warning You can only access attachments for coursework that you created programmatically. You can't access attachments for coursework created by teachers. [Continue](#which_user_journeys_are_supported) | |\n| Teachers discover my content in the Classroom UI | | | |\n\nWhat are the differences in developer experience?\n-------------------------------------------------\n\nEach integration path offers a different developer experience. See the following\nmatrix of developer expectations to compare the three paths.\n\nThe icons in the following table indicate how well the integration options match\neach developer journey. Click any warning to see clarifying\ninformation. \n\n| Journey | Classroom Share buttons | CourseWork API | Classroom Add-on |\n|---------------------------------------------------------------------------------------------|-------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------|\n| I can build an integration without purchasing Google products | | | |\n| I can customize my content's appearance in Classroom | | warning You can set assignment fields directly. Google's web crawlers will retrieve icons and titles for URL links you specify. [Continue](#which_user_journeys_are_supported) | |\n| I receive information about the user or coursework when they open my content from Classroom | | warning You can encode identifying details into the URL links you create in Classroom. However, these are fragile and prone to breakage as users copy coursework to other courses. [Continue](#which_user_journeys_are_supported) | |"]]