您必須先安裝外掛程式,才能使用。安裝完畢後,外掛程式就會在其擴充的 Google Workspace 主機應用程式中提供。
您可以透過 Google Workspace 主機應用程式或 Google Workspace Marketplace 安裝已發布的外掛程式。網域管理員也可以代表使用者從 Google Workspace Marketplace 安裝外掛程式。您也可以安裝未發布的外掛程式,以便測試您正在開發的產品。您必須先授權,才能首次使用已安裝的擴充功能。
安裝外掛程式後,即可在擴充的 Google Workspace 主機應用程式中使用。使用者首次嘗試使用外掛程式時,主機應用程式會向他們顯示授權資訊卡或對話方塊。這個資訊卡會說明外掛程式需要哪些權限才能為使用者執行某些操作,例如存取目前 Google 試算表的內容。使用者可以授予這些權限,讓外掛程式繼續執行。如果使用者拒絕授權,就無法使用外掛程式。
編輯器外掛程式使用的授權模式與 Google Workspace 外掛程式不同。由於編輯器外掛程式會在 Google 雲端硬碟檔案上運作,因此編輯器授權模式會定義各種授權模式,這些模式會在使用外掛程式處理個別檔案時產生。開發編輯器外掛程式時,請務必瞭解不同的模式,以及外掛程式如何在各模式之間移動。
[[["容易理解","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 (世界標準時間)。"],[[["\u003cp\u003eUsers must install and authorize add-ons before using them within Google Workspace applications.\u003c/p\u003e\n"],["\u003cp\u003eAdd-ons request specific permissions during authorization, and users can grant or deny these requests.\u003c/p\u003e\n"],["\u003cp\u003eAdd-ons can be authorized for individual users or by domain administrators for all users.\u003c/p\u003e\n"],["\u003cp\u003eUsers can unauthorize or uninstall add-ons through their Google Account settings or the Google Workspace Marketplace.\u003c/p\u003e\n"],["\u003cp\u003eEditor add-ons have a separate authorization model based on how they interact with Google Drive files.\u003c/p\u003e\n"]]],["Users must first install an add-on, either from the Google Workspace Marketplace or as an unpublished test version. Subsequently, they must authorize the add-on, granting necessary permissions. Published add-ons prompt for authorization upon installation; unpublished ones do so when first used. Authorization may also be needed for updates or third-party services. Users can revoke add-on permissions via their account security settings and can uninstall them from the Marketplace or by following specific steps for unpublished add-ons.\n"],null,["# Install and authorize add-ons\n\nUsers must install and authorize an add-on before they\ncan open and use it. Since these steps are the first part of the\nadd-on user experience, you should understand them\nbefore you start creating your own add-ons.\n\nThis documentation section describes how users can install, authorize, and\nstart using add-ons.\n\nInstall add-ons\n---------------\n\nBefore you can use an add-on, you must *install* it.\nOnce installed, the add-on becomes available in the\nGoogle Workspace\n[host application](/workspace/add-ons/guides/glossary#host_or_host_application)\nit extends.\n\nYou can install published add-ons from the\nGoogle Workspace host application or from the\n[Google Workspace Marketplace](https://workspace.google.com/marketplace).\nDomain administrators can also install add-ons on behalf of their\nusers from the Google Workspace Marketplace. You can also\n[install unpublished add-ons](/workspace/add-ons/how-tos/testing-workspace-addons)\nyou're developing so that you can test them. Before you can use an installed\nadd-on for first time, you must\n[authorize](#authorize_add-ons)\nit.\n\nFor more details, see\n[Publish add-ons](/workspace/add-ons/how-tos/publish-add-on-overview).\n\nAuthorize add-ons\n-----------------\n\nAfter installing an add-on, it becomes available in the\nGoogle Workspace\n[host application](/workspace/add-ons/guides/glossary#host_or_host_application)\nit extends. The first time a user attempts to use the\nadd-on the host application presents them with an\nauthorization card or dialog. This card explains what the\nadd-on needs permission to do for the user, such as\naccessing the content of the current Google Sheet. The user can then grant those\npermissions and allow the add-on to proceed. If the\nuser denies the add-on\nauthorization, they can't use the add-on.\n\nEditor add-ons use an authorization model that differs from\nGoogle Workspace add-ons.\nBecause Editor add-ons operate on Google Drive files, the\neditor authorization model defines various authorization modes that result when\nadd-ons are used with individual files. When developing\nEditor add-ons, it's important to understand the different modes\nand how an add-on moves between them.\n\n### Authorize published add-ons\n\nAfter you install a published add-on, the authorization flow begins immediately:\n\n1. You are prompted to **Choose an account** to install the add-on to.\n2. You are then presented with the list of authorizations the add-on requires to operate, so that you know what it attempts to do. Review this list carefully, and if you still want to grant authorization, click **Allow**. This enables the add-on for use.\n3. You can now run it from the [host application](/workspace/add-ons/guides/glossary#host_or_host_application) it extends. If the application was already open in a browser tab, you may need to refresh the tab before the add-on becomes available.\n\nIf the add-on you've installed is later updated and requires additional\nauthorizations you have not yet granted, you are prompted to provide those\npermissions the next time you use the add-on.\n\n### Authorize unpublished Google Workspace add-ons\n\nUnpublished add-ons don't have the same authorization flow as published add-ons\nbecause they aren't listed in the Google Workspace Marketplace yet. After\ninstalling an unpublished add-on,\nyou aren't immediately asked to authorize. Instead, the authorization flow\nstarts when you first attempt to use the add-on.\n\nWhen an add-on is run, it determines if any user authorization is needed. If\nauthorization is necessary, the add-on presents an authorization card.\nAuthorization is always required the first time an add-on executes, and may also\nbe required if a new version of the add-on uses a service not previously\nauthorized. The **Authorize Access** button provides a dialog window for the\nuser to Allow or Deny authorization for the add-on.\n| **Note:** If the add-on hasn't yet been [verified](/apps-script/guides/client-verification), the [host application](/workspace/add-ons/guides/glossary#host_or_host_application) may present you additional dialogs informing you of this and ask you to confirm that you want to continue.\n\n### Authorize non-Google services for a Google Workspace add-on\n\nIt's possible for a Google Workspace add-on to connect\nto a third-party service that itself requires authorization.\nGoogle Workspace add-ons that connect to such services\nrequire two separate actions from the user:\n\n- Authorization of the add-on itself when the add-on is installed or first started.\n- Authorization of the non-Google service when it is first accessed.\n\nIf a Google Workspace add-on you are developing needs\nto access a non-Google service using OAuth, you must\nconfigure the connection\nfor that service when building the add-on.\n\nFor more information, refer to\n[Connect your Google Workspace add-on to a third-party service](/workspace/add-ons/guides/connect-third-party-service).\n\n#### Third-party conferencing systems\n\n| **Note:** This section describes authorizing conferencing solutions added to Google Calendar with a Google Workspace add-on. \n|\n| **If you don't currently maintain a web-based third-party conferencing\n| system, your add-on doesn't need to authorize any conference solutions.** This functionality was built for conference providers specifically.\n\nGoogle Workspace add-ons that extend Google Calendar\ncan also add additional\n[conferencing solutions](/workspace/add-ons/calendar/conferencing/overview)\nthat let users select a third-party conferencing system when editing\nGoogle Calendar events. If your add-on provides conferencing options that\nrequire the user to log into them, your add-on must give the user the ability\nto do so.\n\nIf a user attempts to create a conference with your add-on without a necessary\nsign in, the conference solutions's [`onCreateFunction` method](/apps-script/manifest/calendar-addons#ConferenceSolution.FIELDS.onCreateFunction)\nshould return a\n[`ConferenceData`](/apps-script/reference/conference-data/conference-data)\nobject containing an\n[`ConferenceError`](/apps-script/reference/conference-data/conference-error)\nwith an\n[authentication URL](/apps-script/reference/conference-data/conference-error#setauthenticationurlauthenticationurl).\n\nUpon receiving this object, Google Calendar creates a **LOG IN** button in\nthe event edit UI that links to the authentication URL the add-on provides.\nUsers can then use this button to log into the third-party system prior to\nusing the add-on further.\n\nSee [Creating third-party conferences](/workspace/add-ons/calendar/conferencing/create-conference#handling_errors)\nfor more details on handling authorization using `ConferenceError`.\n\n### Authorize unpublished Editor add-ons\n\nIt's a best practice to [test Editor add-ons](/workspace/add-ons/how-tos/testing-editor-addons)\nas you develop them. The authorization flow is identical to that\nfor [published Editor add-ons](#authorizing_published_add-ons), except that the flow\nstarts when you first attempt to test the add-on. If you later retest the same\nadd-on, you aren't prompted for authorization again.\n\nUnauthorize add-ons\n-------------------\n\nWhen developing add-ons, it can be useful to unauthorize them so you can retest\nthe authorization flow.\n\nYou can unauthorize an add-on by doing the following:\n\n1. Open your [account security console](https://myaccount.google.com/permissions).\n2. Locate and click the add-on you wish to unauthorize.\n3. Click **Remove Access**.\n\nWhen you run the add-on again after unauthorizing it, the authorization flow\nis presented again.\n\nUninstall add-ons\n-----------------\n\nTo uninstall an add-on that you installed from the\nGoogle Workspace Marketplace, refer to\n[Uninstall a Marketplace app or add-on](https://support.google.com/marketplace/answer/13988109).\n\nTo uninstall an unpublished add-on built in\nApps Script, refer to [Uninstall an unpublished\nadd-on](/workspace/add-ons/how-tos/testing-workspace-addons#uninstall_an_unpublished).\n\nRelated topics\n--------------\n\n- [Open and use installed add-ons](/workspace/add-ons/guides/using-addons)\n- [Connect your Google Workspace add-on to a third-party service](/workspace/add-ons/guides/connect-third-party-service)"]]