如要定義授予應用程式的存取權層級,您必須識別並宣告授權範圍。授權範圍是 OAuth 2.0 URI 字串,其中包含 Google Workspace 應用程式名稱、應用程式存取的資料類型,以及存取層級。「範圍」是指應用程式要求處理 Google Workspace 資料的權限,包括使用者的 Google 帳戶資料。
[null,null,["上次更新時間:2024-12-21 (世界標準時間)。"],[[["This document outlines authorization and authentication for the Drive Labels API, specifically focusing on OAuth 2.0 configuration and necessary scopes."],["Users should configure the OAuth consent screen, choose appropriate scopes based on required access levels, and verify their application if using sensitive scopes."],["Different scopes are available for Drive items and labels, providing varying levels of access for reading, searching, and modifying metadata, viewing, and managing labels, including administrator access for managing organizational labels."],["To manage administrator labels, specific requirements include setting `useAdminAccess` to `true`, having administrator privileges with \"Manage Labels\" rights, and understanding the relationship between `label type` and user roles for write access."],["It is crucial to refer to external documentation for Google Workspace's general authentication and authorization information, OAuth consent screen configuration, unverified apps, Drive API OAuth 2.0 scopes, Drive API-specific authorization, and creating access credentials for comprehensive understanding and setup."]]],["To use the Drive Labels API, configure OAuth 2.0, define authorization scopes, and complete app verification if necessary. Scopes determine the app's access level to Google Workspace data. Use non-sensitive scopes whenever possible for per-file access. Specific scopes, such as `drive.labels` or `drive.admin.labels`, allow managing labels. Administrators can manage `ADMIN` and `SHARED` labels by setting `useAdminAccess` to true; otherwise write access is limited to `SHARED` labels.\n"]]