所有 Google Workspace 集成都依赖于 Google Cloud 来配置 API 访问权限、处理身份验证和授权,以及管理应用。您可能还需要获取 Google 课堂的访问权限,以便测试集成。
本指南介绍了如何请求和配置这些资源。
设置 Google Cloud 项目
完成 Google Workspace 开发者入门步骤。所有 Google Workspace 集成都必须执行这些步骤。
测试账号和网域
演示网域是用于 Google 课堂 API 集成的测试账号。演示网域代表一所虚构的学校,该学校订阅了 Google Workspace 教育版,您可以使用该网域开发和测试集成,而不会影响实际用户。
您可以获取测试网域,以便测试管理员功能或使用 Classroom API 进行开发。
获取管理测试网域
如果您只需要测试 API 的管理员权限,可以使用预构建的演示环境。例如,代表教师创建课程。
如需使用预建环境,请加入 Google Cloud Partner Advantage 计划。会员可以访问 Partner Advantage 的 Google 教育页面。本页介绍了如何访问我们预构建的 Google Workspace 教育版演示环境,该环境可用于客户演示、产品问题排查、功能测试等。
获取开发者演示网域
如需代表教师和学生用户提出请求,您需要创建并管理自己的 Google Workspace 教育版演示网域。演示网域包含免费的永久性 Google Workspace 教育基础版许可。您可以根据需要向网域添加更多产品。
[null,null,["最后更新时间 (UTC):2025-08-01。"],[],[],null,["# Prerequisites\n\nAll Google Workspace integrations depend on Google Cloud to configure API\naccess, handle authentication and authorization, and manage applications. You\nmight also need to obtain access to Google Classroom to test your integration.\nThis guide describes how to request and configure these resources.\n\nSet up a Google Cloud project\n-----------------------------\n\n| **Key Point:** You must use a Google Cloud project to manage a Google Classroom integration. You don't need to use any paid Google Cloud features to use Classroom API.\n\nComplete the [steps to get started](/workspace/guides/get-started) for Google Workspace\ndevelopers. These steps are **required** for all Google Workspace\nintegrations.\n\nTest accounts and domains\n-------------------------\n\n| **Key Point:** While standard Gmail accounts can access Google Classroom, you will need a demo domain if you are attempting to test behaviors that only apply to Google Workspace for Education users, such as special administrator capabilities.\n\n**Demo domains** are test accounts for Classroom API integrations. A\ndemo domain represents a fictional school with a Google Workspace for Education subscription you can\nuse for developing and testing integrations without affecting live users.\n\nYou can get a test domain to test administrator capabilities or for development\nwith the Classroom API.\n\n### Get an administrative test domain\n\nYou can use a prebuilt demo environment if you only need to test administrator\npermissions of the API. This includes, for example, creating courses on behalf\nof teachers.\n\nTo use the prebuilt environment, join the Google Cloud [Partner Advantage\nProgram](//www.partneradvantage.goog/GCPPRM/s/partnerselfregistration). Members receive access to the [Google for Education page](//www.partneradvantage.goog/GCPPRM/s/productgoogleeducation) of Partner\nAdvantage. This page describes how to access our prebuilt Google Workspace for\nEducation demo environment that can be used for customer demos, product\ntroubleshooting, feature testing, and more.\n\n### Get a developer demo domain\n\nTo make requests on behalf of teacher and student users, you need to create and\nmanage your own Google Workspace for Education demo domain. Demo domains include a free, permanent\nGoogle Workspace for Education Fundamentals [license](//edu.google.com/intl/ALL_us/workspace-for-education/editions/compare-editions/). More products can be added to the domain as\nneeded.\n\nComplete the following steps to get a developer demo domain.\n\n1. Purchase a domain in the format `gedu.demo.`\u003cvar translate=\"no\"\u003eYOUR DOMAIN\u003c/var\u003e. For example, an organization that operates the domain `myedtech.com` should create `gedu.demo.myedtech.com`. Demo domains must follow this format.\n2. [Sign up for Google Workspace for Education](//workspace.google.com/signup/edu/welcome) using the demo domain. This starts a\n two-week trial period.\n\n | **Important:** The new domain must be a **primary** Google Workspace domain. This means that your demo domain cannot be a subdomain of an existing Google Workspace domain, which are referred to as *secondary* domains. Google cannot grant a demo license to a secondary domain. See the [Choose your primary domain](//support.google.com/a/answer/182080) and [Change your primary domain](//support.google.com/a/topic/6302293) Help Center articles for more information about managing domains used for Google Workspace.\n | **Caution:** Don't wait! Complete the following steps *as soon as possible* after starting the two-week trial period. We can only take action on *active\n | Google Workspace for Education subscriptions*.\n3. [Verify](//support.google.com/a/answer/60216) that you own the demo domain.\n\n4. Fill out this [form](//docs.google.com/a/google.com/forms/d/e/1FAIpQLScFnnpQCCbqw-Phwv3ZOkFkSRnH7JhpyBgPl15M_oZBbC3FjA/viewform) to notify Google of your domain registration.\n\n5. If you are developing an integration that uses paid Google Classroom\n features, [request a demo domain upgrade](#request-demo).\n\n6. Sign in to the [Google Admin console](//admin.google.com/) using the\n administrator account you specified when signing up for Google Workspace for Education. From here,\n [create new demo domain users](//knowledge.workspace.google.com/kb/how-to-create-a-new-user-000007668); we recommend creating at least three\n additional users: one to act as teacher and two students.\n\n7. Sign in to [Google Classroom](//classroom.google.com/) using a new teacher account.\n [Create a new class](//support.google.com/edu/classroom/answer/6020273) and [add your new student accounts](//support.google.com/edu/classroom/answer/6020282) to it.\n\n| **Tip:** Create separate Chrome profiles for your demo domain users so that you can quickly switch between them while using your demo domain.\n\n#### Request a demo domain upgrade for premium features\n\n| **Key Point:** Some Google Classroom features require a paid Google Workspace for Education [license](//edu.google.com/intl/ALL_us/workspace-for-education/editions/compare-editions/). Request an upgrade for your demo domain to be able to test an integration that relies on these features.\n\nUsers must have an appropriate Google Workspace for Education license to use integrations that affect\nor depend on premium Classroom features. These features include:\n\n- Classroom add-ons\n- Grading periods\n- Grading scales\n- Grade export\n- Roster sync\n- Rubrics\n\nSee the [Google Workspace for Education licenses](//edu.google.com/intl/ALL_us/workspace-for-education/editions/compare-editions/) page for the full list of features\navailable at each subscription level.\n\nIf your integration will use any of these features, complete the following steps\nto request a demo domain upgrade. An upgraded domain will be granted ten free\nGoogle Workspace for Education Plus licenses to assign to your test users.\n\n1. Complete the steps to [get a developer demo domain](#get-developer) if you haven't already.\n2. Complete and submit the [demo domain upgrade request form](//docs.google.com/forms/d/e/1FAIpQLSeBARH7nviEOyqFp3OWKVR6m4621UW9ELzUFI_XDu5ENqUUGw/viewform?usp=sf_link). Submitting this form requests that Google upgrade your demo domain to Google Workspace for Education Plus with ten licenses.\n3. You will receive an email when the upgrade process is complete.\n4. Assign Plus licenses to your test teacher accounts in the upgraded demo domain [Admin console](//admin.google.com/).\n 1. Under **Directory \\\u003e Users**, create or select your test teacher account(s).\n 2. In each teacher's **Licenses** , confirm that Google Workspace for Education Plus is **Assigned**."]]