Оптимизируйте свои подборки
Сохраняйте и классифицируйте контент в соответствии со своими настройками.
Этот документ содержит информацию об авторизации и аутентификации, специфичную для Directory API. Прежде чем читать этот документ, обязательно прочтите общую информацию об аутентификации и авторизации Google Workspace в разделе Подробнее об аутентификации и авторизации .
Настройте OAuth 2.0 для авторизации
Настройте экран согласия OAuth и выберите области , чтобы определить, какая информация будет отображаться пользователям и рецензентам приложений, а также зарегистрируйте свое приложение, чтобы можно было опубликовать его позже.
Области API каталога
Чтобы определить уровень доступа, предоставленный вашему приложению, вам необходимо определить и объявить области авторизации . Область авторизации – это строка URI OAuth 2.0, содержащая имя приложения Google Workspace, тип данных, к которым оно обращается, и уровень доступа. Области – это запросы вашего приложения на работу с данными 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"]],["Последнее обновление: 2025-08-29 UTC."],[],[],null,["# Choose Directory API scopes\n\nThis document contains Directory API-specific authorization and\nauthentication information. Before reading this document, be sure to read the\nGoogle Workspace's general authentication and authorization information at\n[Learn about authentication and authorization](/workspace/guides/auth-overview).\n\nConfigure OAuth 2.0 for authorization\n-------------------------------------\n\n[Configure the OAuth consent screen and choose scopes](/workspace/guides/configure-oauth-consent)\nto define what information is displayed to users and app reviewers, and register\nyour app so that you can publish it later.\n\nDirectory API scopes\n--------------------\n\nTo define the level of access granted to your app, you need to identify and\ndeclare *authorization scopes*. An authorization scope is an OAuth 2.0 URI string\nthat contains the Google Workspace app name, what kind of data it accesses, and\nthe level of access. Scopes are your app's requests to work with Google Workspace data, including\nusers' Google Account data.\n\n\nWhen your app is installed, a user is asked to validate the scopes used\nby the app. Generally, you should choose the most narrowly focused scope\npossible and avoid requesting scopes that your app doesn't require. Users more\nreadily grant access to limited, clearly described scopes.\n| If your public application uses scopes that permit access to certain user data, it must complete a verification process. If you see **unverified\n| app** on the screen when testing your application, you must submit a verification request to remove it. Find out more about [unverified apps](https://support.google.com/cloud/answer/7454865) and get answers to [frequently asked questions about app verification](https://support.google.com/cloud/answer/9110914) in the Help Center.\n\nThe Directory API supports the following scopes:\n\n| Scopes for devices | Meaning |\n|------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------|\n| `https://www.googleapis.com/auth/admin.directory.device.chromeos` | Global scope for access to all Chrome device operations. |\n| `https://www.googleapis.com/auth/admin.directory.device.chromeos.readonly` | Scope for only retrieving Chrome devices. |\n| `https://www.googleapis.com/auth/admin.directory.device.mobile` | Global scope for access to all mobile device operations. |\n| `https://www.googleapis.com/auth/admin.directory.device.mobile.readonly` | Scope for only retrieving mobile device |\n| `https://www.googleapis.com/auth/admin.directory.device.mobile.action` | Scope for tasks that take an action on a mobile device. |\n| `https://www.googleapis.com/auth/admin.directory.group.member` | Scope for access to all group member roles and information operations. |\n| `https://www.googleapis.com/auth/admin.directory.group.member.readonly` | Scope for only retrieving group member roles and information. |\n| `https://www.googleapis.com/auth/admin.directory.group` | Global scope for access to all group operations, including group aliases and members. |\n| `https://www.googleapis.com/auth/admin.directory.group.readonly` | Scope for only retrieving group, group alias, and member information. |\n| `https://www.googleapis.com/auth/admin.directory.orgunit` | Global scope for access to all organizational unit operations. |\n| `https://www.googleapis.com/auth/admin.directory.orgunit.readonly` | Scope for only retrieving organizational units. |\n| `https://www.googleapis.com/auth/admin.directory.user` | Global scope for access to all user and user alias operations. |\n| `https://www.googleapis.com/auth/admin.directory.user.readonly` | Scope for only retrieving users or user aliases. |\n| `https://www.googleapis.com/auth/admin.directory.user.alias` | Scope for access to all user alias operations. |\n| `https://www.googleapis.com/auth/admin.directory.user.alias.readonly` | Scope for only retrieving user aliases. |\n| `https://www.googleapis.com/auth/admin.directory.user.security` | Scope for access to all application-specific password, OAuth token, and verification code operations. |\n| `https://www.googleapis.com/auth/admin.directory.rolemanagement` | Scope for all roles management operations, including creating roles and role assignments. |\n| `https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly` | Scope for getting and listing roles, privileges, and role assignments. |\n| `https://www.googleapis.com/auth/admin.directory.userschema` | Scope for access to all custom user schema operations. |\n| `https://www.googleapis.com/auth/admin.directory.userschema.readonly` | Scope for only retrieving custom user schemas. |\n| `https://www.googleapis.com/auth/admin.directory.customer` | Scope for access to all customer operations. |\n| `https://www.googleapis.com/auth/admin.directory.customer.readonly` | Scope for only retrieving customers. |\n| `https://www.googleapis.com/auth/admin.directory.domain` | Scope for access to all domain operations. |\n| `https://www.googleapis.com/auth/admin.directory.domain.readonly` | Scope for only retrieving domains. |\n| `https://www.googleapis.com/auth/admin.directory.resource.calendar` | Scope for access to all calendar resources operations. |\n| `https://www.googleapis.com/auth/admin.directory.resource.calendar.readonly` | Scope for only retrieving calendar resources. |"]]