如果您想在应用中使用 Apps Script API,则必须在应用的 GCP 项目中启用 Apps Script API。启用 Apps 脚本 API 后,您可以创建 OAuth 凭据并下载客户端 ID 和密钥,以包含在您的应用中。您还可以在 Google Cloud 控制台中监控 API 用量。
您可以使用此向导在 API 控制台中创建或选择 Google Cloud 项目,并自动启用 API。或者,您也可以打开控制台的“管理资源”页面,选择一个项目,然后使用该项目的 API 和服务信息中心手动搜索并添加 Apps 脚本 API。启用该 API 后,您可以在 API 和服务 > 凭据面板中为应用创建 OAuth 凭据、客户端 ID 和客户端密钥。
[[["易于理解","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"]],["最后更新时间 (UTC):2025-08-04。"],[[["The Apps Script API requires enabling in your Google Cloud project to use it within your own application, allowing you to create OAuth credentials for user authorization."],["To allow external applications to manage your script projects, you must grant access to them through the Apps Script dashboard, understanding the potential security risks involved."],["Granting access enables third-party applications to create, modify, and deploy your Apps Script projects but does not automatically authorize them; individual authorization is still required."],["Executing Apps Script functions through the API does not necessitate granting access to your script projects."]]],[]]