تنظيم صفحاتك في مجموعات يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
تتطلّب واجهة برمجة التطبيقات Apps Script أنواعًا مختلفة من أذونات الوصول حسب هدفك:
استخدِم Apps Script API في تطبيقك.
السماح لتطبيقات أخرى بإدارة بيانات مشروع البرنامج النصي أو عمليات النشر
إذا كنت بحاجة إلى استخدام Apps Script API في تطبيقك، عليك تفعيل واجهة برمجة التطبيقات في مشروع Google Cloud الخاص بالتطبيق. يتيح لك ذلك إنشاء بيانات اعتماد OAuth ليتمكّن مستخدمو التطبيق من منح الإذن له.
إذا أردت السماح لتطبيقات تابعة لجهات خارجية بإدارة المحتوى أو عملية نشر مشاريع البرامج النصية، عليك منح إذن الوصول إلى مشاريع البرامج النصية.
استخدام Apps Script API في تطبيقك
إذا كنت تريد استخدام واجهة برمجة التطبيقات Apps Script API داخل تطبيقك، عليك تفعيلها في مشروع GCP الخاص بتطبيقك. بعد تفعيل Apps Script API، يمكنك إنشاء بيانات اعتماد OAuth وتنزيل معرّف العميل وسر العميل لتضمينهما في تطبيقك. يمكنك أيضًا مراقبة استخدام واجهة برمجة التطبيقات في وحدة تحكّم Google Cloud.
يمكنك استخدام هذا المعالج لإنشاء مشروع على Google Cloud أو اختياره في وحدة تحكّم واجهة برمجة التطبيقات وتفعيل واجهة برمجة التطبيقات تلقائيًا. بدلاً من ذلك، يمكنك فتح صفحة إدارة الموارد في وحدة التحكّم، واختيار مشروع، ثم البحث عن واجهة برمجة التطبيقات Apps Script API وإضافتها يدويًا باستخدام لوحة بيانات واجهات برمجة التطبيقات والخدمات الخاصة بالمشروع. بعد تفعيل واجهة برمجة التطبيقات، يمكنك إنشاء بيانات اعتماد OAuth ومعرّفات العملاء وأسرار العملاء لتطبيقاتك في لوحة واجهات برمجة التطبيقات والخدمات > بيانات الاعتماد.
منح التطبيقات الخارجية إذن الوصول إلى مشاريع النصوص البرمجية
يمكن أن تتيح واجهة برمجة التطبيقات لبرمجة التطبيقات للتطبيقات إنشاء وتعديل النصوص البرمجية وعمليات التفعيل. ويمكن أن يؤدي ذلك إلى حدوث مشكلة إذا سمحت لتطبيق ضار تابع لجهة خارجية بالوصول إلى حسابك، ثم بدأ هذا التطبيق بإنشاء المزيد من النصوص البرمجية الضارة أو تعديل سلوك النصوص البرمجية المتوفّرة لديك.
للمساعدة في الحدّ من هذه المخاطر، لا يمكن لواجهة برمجة التطبيقات Apps Script الوصول إلى مشاريع البرامج النصية تلقائيًا. يجب منح واجهة برمجة التطبيقات إذن الوصول بشكل صريح قبل أن تتمكّن من استخدام أي تطبيق ينشئ أو يعدّل البرامج النصية أو عمليات النشر. بعد منح واجهة برمجة التطبيقات إذن الوصول إلى البرامج النصية، يمكن للتطبيقات التي تمنحها الإذن استخدام واجهة برمجة التطبيقات لإدارة مشاريع البرامج النصية.
سيحدث خطأ إذا حاولت تشغيل تطبيق متأثّر بدون منح إذن الوصول إلى واجهة برمجة التطبيقات أولاً. يحدث هذا الخطأ بعد السماح للتطبيق بالوصول إلى البيانات.
يمكنك منح واجهة برمجة التطبيقات "برمجة التطبيقات" إذن الوصول إلى مشاريع النصوص البرمجية باستخدام لوحة بيانات "برمجة التطبيقات". يمكنك أيضًا استخدام لوحة البيانات لإبطال إذن الوصول هذا في أي وقت. عند منح إذن الوصول إلى واجهة برمجة التطبيقات، يتم منح هذا الإذن لجميع التطبيقات. ومع ذلك، يجب منح الإذن للتطبيقات الفردية.
قبل منح إذن الوصول، تأكَّد من أنّك على دراية بالمخاطر التي ينطوي عليها السماح للتطبيقات بتعديل النصوص البرمجية. لا تمنح أبدًا الإذن لأي تطبيق تشك في أنّه ضار.
تاريخ التعديل الأخير: 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."]]