با مجموعهها، منظم بمانید ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
این سند حاوی اطلاعات مجوز و احراز هویت مخصوص Google Docs API است. قبل از خواندن این سند، حتماً اطلاعات عمومی احراز هویت و مجوز Google Workspace را در اطلاعات مربوط به احراز هویت و مجوز مطالعه کنید.
برای تعریف سطح دسترسی اعطا شده به برنامه خود، باید محدوده های مجوز را شناسایی و اعلام کنید. محدوده مجوز یک رشته URI OAuth 2.0 است که حاوی نام برنامه Google Workspace، نوع دادههایی است که به آن دسترسی دارد و سطح دسترسی. Scopes درخواستهای برنامه شما برای کار با دادههای Google Workspace، از جمله دادههای حساب Google کاربران است.
هنگامی که برنامه شما نصب می شود، از کاربر خواسته می شود تا محدوده های مورد استفاده برنامه را تأیید کند. به طور کلی، شما باید محدودترین محدوده ممکن را انتخاب کنید و از درخواست دامنه هایی که برنامه شما به آن نیاز ندارد اجتناب کنید. کاربران با سهولت بیشتری به محدودههای محدود و به وضوح توضیح داده شده دسترسی میدهند.
در صورت امکان، استفاده از دامنههای غیر حساس را توصیه میکنیم زیرا دامنه دسترسی به هر فایل را میدهد و دسترسی به ویژگیهای خاص مورد نیاز یک برنامه را محدود میکند.
Docs API از حوزه های زیر پشتیبانی می کند:
کد محدوده
توضیحات
استفاده
https://www.googleapis.com/auth/documents
همه اسناد Google Docs خود را مشاهده، ویرایش، ایجاد و حذف کنید.
فقط فایلهای Google Drive خاصی را که با این برنامه استفاده میکنید، مشاهده، ویرایش، ایجاد و حذف کنید.
توصیه می شود غیر حساس
https://www.googleapis.com/auth/drive
همه فایلهای Google Drive خود را مشاهده، ویرایش، ایجاد و حذف کنید.
محدود شده است
https://www.googleapis.com/auth/drive.readonly
همه فایلهای Google Drive خود را ببینید و دانلود کنید.
محدود شده است
ستون Usage در جدول حساسیت هر محدوده را با توجه به تعاریف زیر نشان می دهد:
غیر حساس : این حوزهها کوچکترین محدوده دسترسی مجوز را ارائه میکنند و فقط به تأیید اولیه برنامه نیاز دارند. برای کسب اطلاعات در مورد این الزام، به ارسال برنامه خود برای تأیید مراجعه کنید.
حساس : این حوزهها دسترسی به دادههای کاربر Google خاص را که توسط کاربر برای برنامه شما مجاز است، فراهم میکنند. از شما میخواهد تا از تأیید برنامه اضافی عبور کنید. برای اطلاعات در مورد این نیاز، به الزامات محدوده حساس و محدود مراجعه کنید.
محدود شده : این حوزهها دسترسی گستردهای به دادههای کاربر Google را فراهم میکنند و از شما میخواهند که یک فرآیند تأیید دامنه محدود را طی کنید. برای کسب اطلاعات در مورد این الزام، به خطمشی دادههای کاربر سرویسهای Google API و الزامات اضافی برای محدودههای API خاص مراجعه کنید. اگر دادههای محدوده محدود را روی سرورها ذخیره میکنید (یا ارسال میکنید)، پس باید ارزیابی امنیتی را انجام دهید.
اگر برنامه شما نیاز به دسترسی به سایر APIهای Google دارد، میتوانید آن محدودهها را نیز اضافه کنید. برای اطلاعات بیشتر در مورد دامنه های Google API، به استفاده از OAuth 2.0 برای دسترسی به Google API مراجعه کنید.
تاریخ آخرین بهروزرسانی 2025-08-01 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","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-01 بهوقت ساعت هماهنگ جهانی."],[],[],null,["# Choose Google Docs API scopes\n\nThis document contains Google Docs 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\nDocs 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\nWhen possible, we recommend using non-sensitive scopes as it grants per-file\naccess scope and narrows access to specific features needed by an app.\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 Docs API supports the following scopes:\n\n| Scope code | Description | Usage |\n|------------------------------------------------------|-------------------------------------------------------------------------------------------|---------------------------|\n| `https://www.googleapis.com/auth/documents` | See, edit, create, and delete all your Google Docs documents. | Sensitive |\n| `https://www.googleapis.com/auth/documents.readonly` | See all your Google Docs documents. | Sensitive |\n| `https://www.googleapis.com/auth/drive.file` | See, edit, create, and delete only the specific Google Drive files you use with this app. | Recommended Non-sensitive |\n| `https://www.googleapis.com/auth/drive` | See, edit, create, and delete all of your Google Drive files. | Restricted |\n| `https://www.googleapis.com/auth/drive.readonly` | See and download all your Google Drive files. | Restricted |\n\nThe Usage column in the table indicates the sensitivity of each scope, according\nto the following definitions:\n\n- **Non-sensitive** : These scopes provide the smallest scope of authorization\n access and only requires basic app verification. For information on this\n requirement, see [Submitting your app for\n verification](https://support.google.com/cloud/answer/13461325).\n\n- **Sensitive** : These scopes provide access to specific Google User Data\n that's authorized by the user for your app. It requires you to go through\n additional app verification. For information on this requirement, see\n [Sensitive and Restricted Scope\n Requirements](https://support.google.com/cloud/answer/13464321#ss-rs-requirements).\n\n- **Restricted** : These scopes provide wide access to Google User Data and\n require you to go through a restricted scope verification process. For\n information on this requirement, see [Google API Services User Data\n Policy](/terms/api-services-user-data-policy) and [Additional Requirements\n for Specific API\n Scopes](/terms/api-services-user-data-policy#additional_requirements_for_specific_api_scopes).\n If you store restricted scope data on servers (or transmit), then you must\n go through a security assessment.\n\nIf your app requires access to any other Google APIs, you can add those scopes\nas well. For more information about Google API scopes, see [Using OAuth 2.0 to\nAccess Google APIs](/identity/protocols/oauth2).\n\nFor more information about specific OAuth 2.0 scopes, see [OAuth 2.0 Scopes for\nGoogle APIs](/identity/protocols/oauth2/scopes).\n\nRelated topics\n--------------\n\n- [Choose Google Drive API scopes](/workspace/drive/api/guides/api-specific-auth)\n- [OAuth App Verification Help Center](https://support.google.com/cloud/answer/13463073)\n- [OAuth App Verification FAQs](https://support.google.com/cloud/answer/13463817)"]]