如果您需要在應用程式中使用 Apps Script API,請務必在應用程式的 Google Cloud 專案中啟用該 API。這樣一來,您就能建立 OAuth 憑證,讓應用程式使用者授權。
如要讓第三方應用程式管理指令碼專案的內容或部署作業,您必須授予存取權。
在應用程式中使用 Apps Script API
如果您想在應用程式中使用 Apps Script API,必須在應用程式的 GCP 專案中啟用 Apps Script API。啟用 Apps Script API 後,您可以建立 OAuth 憑證,並下載用戶端 ID 和密鑰,以便納入應用程式。您也可以在 Google Cloud 控制台中監控 API 用量。
您可以使用這個精靈,在 API 控制台中建立或選取 Google Cloud 專案,並自動啟用 API。或者,您也可以開啟控制台的「管理資源」頁面,選取專案,然後使用專案的「API 和服務」資訊主頁搜尋並手動新增 Apps Script 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"]],["上次更新時間:2024-12-22 (世界標準時間)。"],[[["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."]]],[]]