با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
Apps Script API بسته به هدف شما به انواع مختلفی از مجوزها نیاز دارد:
از Apps Script API در برنامه خود استفاده کنید.
به برنامههای کاربردی دیگر اجازه دهید دادهها یا استقرارهای پروژه اسکریپت شما را مدیریت کنند.
اگر نیاز به استفاده از Apps Script API در برنامه خود دارید، باید API را در پروژه Google Cloud برنامه فعال کنید . این به شما امکان می دهد اعتبارنامه OAuth را ایجاد کنید تا کاربران برنامه بتوانند آن را مجاز کنند.
اگر می خواهید به برنامه های شخص ثالث اجازه دهید محتوا یا استقرار پروژه های اسکریپت شما را مدیریت کنند، باید به پروژه های اسکریپت خود دسترسی داشته باشید .
با استفاده از Apps Script API در برنامه خود
اگر می خواهید از Apps Script API در داخل برنامه خود استفاده کنید، باید Apps Script API را در پروژه GCP برنامه خود فعال کنید. پس از فعال کردن Apps Script API، می توانید اعتبارنامه OAuth را ایجاد کنید و شناسه مشتری و راز را دانلود کنید تا در برنامه خود قرار دهید. همچنین میتوانید استفاده از API را در کنسول Google Cloud نظارت کنید.
می توانید از این جادوگر برای ایجاد یا انتخاب یک پروژه Google Cloud در کنسول API استفاده کنید و به طور خودکار API را فعال کنید. همچنین، میتوانید صفحه مدیریت منابع کنسول را باز کنید ، پروژهای را انتخاب کنید، سپس Apps Script API را به صورت دستی با استفاده از داشبورد APIها و خدمات پروژه جستجو کرده و اضافه کنید. هنگامی که API را فعال کردید، میتوانید اعتبارنامههای OAuth، شناسههای مشتری، و اسرار سرویس گیرنده را برای برنامههای خود در پنل APIs & Services > Credentials ایجاد کنید.
شروع سریع Apps Script API یک نگاه گام به گام به کل فرآیند فعال کردن API و تنظیم مجوز برای یک برنامه ارائه می دهد.
اعطای دسترسی به برنامه های شخص ثالث به پروژه های اسکریپت شما
Apps Script API میتواند به برنامهها اجازه دهد تا اسکریپتهای شما و استقرار آنها را ایجاد و تغییر دهند. اگر به یک برنامه شخص ثالث مخرب مجوز دهید که سپس اقدام به ایجاد اسکریپت های مخرب بیشتری کند یا رفتار اسکریپت هایی را که قبلاً دارید تغییر دهد، می تواند منجر به وضعیت بدی شود.
برای کمک به کاهش این خطر، Apps Script API نمی تواند به طور پیش فرض به پروژه های اسکریپت شما دسترسی داشته باشد. قبل از اینکه بتوانید از هر برنامهای که اسکریپتها یا استقرارها را ایجاد یا تغییر میدهد استفاده کنید، باید صریحاً به API دسترسی بدهید. هنگامی که به API اجازه دسترسی به اسکریپت های خود را دادید، برنامه هایی که مجوز می دهید می توانند از API برای مدیریت پروژه های اسکریپت خود استفاده کنند.
اگر بخواهید یک برنامه آسیب دیده را بدون اجازه دسترسی به API اجرا کنید، یک خطا رخ می دهد. این خطا پس از تایید برنامه رخ می دهد.
میتوانید با استفاده از داشبورد Apps Script به Apps Script API اجازه دسترسی به پروژههای اسکریپت خود بدهید. همچنین می توانید از داشبورد برای لغو این دسترسی در هر زمان استفاده کنید. وقتی به API دسترسی می دهید، این کار را برای همه برنامه ها انجام می دهید. با این حال، برنامه های فردی هنوز نیاز به مجوز دارند.
قبل از اینکه اجازه دسترسی بدهید، مطمئن شوید که متوجه شده اید که اجازه دادن به برنامه ها برای اصلاح اسکریپت های شما خطری وجود دارد. هرگز برنامهای را که مشکوک به مخرب بودن آن هستید مجوز ندهید.
تاریخ آخرین بهروزرسانی 2025-08-04 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","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-04 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eThe 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.\u003c/p\u003e\n"],["\u003cp\u003eTo 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.\u003c/p\u003e\n"],["\u003cp\u003eGranting 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.\u003c/p\u003e\n"],["\u003cp\u003eExecuting Apps Script functions through the API does not necessitate granting access to your script projects.\u003c/p\u003e\n"]]],[],null,["The Apps Script API requires different types of authorizations depending on\nyour goal:\n\n- Use the Apps Script API in your app.\n- Allow other applications to manage your script project data or deployments.\n\nIf you need to use the Apps Script API in your application, you must *enable*\nthe API in the application's\n[Google Cloud project](https://cloud.google.com/apis/docs/enable-disable-apis#enable_an_api).\nThis allows you to create OAuth credentials so that users of the application\ncan authorize it.\n\nIf you want to let third-party applications manage the content or deployment\nof your script projects, you must *grant access* to your script projects.\n\nUsing the Apps Script API in your app\n\nIf you want to use the Apps Script API inside your app, you must enable\nthe Apps Script API in your application's GCP project. After\nenabling the Apps Script API, you can create OAuth credentials and download\nthe client ID and secret to include in your application. You can also\nmonitor the API usage in the\n[Google Cloud console](https://console.cloud.google.com/).\n\nYou can use\n[this wizard](https://console.developers.google.com/start/api?id=script)\nto create or select a Google Cloud project in the API console and automatically enable\nthe API. Alternatively, you can\n[open the console's **Manage Resources** page](https://console.cloud.google.com/cloud-resource-manager),\nselect a project, then search for and add the Apps Script API manually using the\nproject's **APIs \\& services** dashboard. Once you've enabled the API, you can\ncreate OAuth credentials, client IDs, and client secrets for your applications\nin the **APIs \\& services \\\u003e Credentials** panel.\n\nThe [Apps Script API quickstarts](/apps-script/api/quickstart/python#step_1_turn_on_the_api_name)\nprovide a step-by-step look at the whole process of enabling the API and\nsetting up authorization for an application.\n\nGranting third-party applications access to your script projects\n\nThe Apps Script API can allow applications to create and modify your scripts\nand their [deployments](/apps-script/concepts/deployments). This can lead to\na bad situation if you authorize a malicious third-party application which\nthen proceeds to create more malicious scripts or modify the behavior of\nscripts you already have.\n\nTo help reduce this risk, the Apps Script API cannot access your script\nprojects by default. You must explicitly grant the API access before you can use\nany application that creates or modifies scripts or deployments. Once you've\ngranted the API access to your scripts, applications you authorize can use the\nAPI to manage your script projects.\n\nAn error results if you attempt to run an affected application without\nfirst granting the API access. This error occurs after you authorize the\napplication.\n| **Note:** Applications can use the Apps Script API to [execute Apps Script functions](/apps-script/api/reference/rest/v1/scripts/run). These API requests do not require granting access to your script projects.\n\nYou can grant the Apps Script API access to your script projects using the\n[Apps Script dashboard](/apps-script/guides/dashboard#settings). You can also\nuse the dashboard to revoke this access at any time. When you grant the\nAPI access, you are doing so for *all* applications. Individual applications\nstill need to be authorized, however.\n\nBefore you grant access, be sure you understand that there is a risk involved\nin allowing applications to modify your scripts. Never authorize any application\nthat you suspect is malicious."]]