تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
في معظم صفحات المستندات، يظهر مستكشف واجهات برمجة التطبيقات بشكل مختصر على الجانب الأيسر من الشاشة. إذا لم يظهر "مستكشف واجهات برمجة التطبيقات"، انقر على تجربة لعرض النسخة المختصرة من "مستكشف واجهات برمجة التطبيقات".
إذا لم يظهر الزر تجربة على الجانب الأيسر من صفحة مستندات مرجعية، يعني ذلك أنّ الطريقة غير متوافقة مع واجهة برمجة التطبيقات Explorer. على سبيل المثال، لا يتوافق مستكشف واجهات برمجة التطبيقات مع واجهات برمجة التطبيقات التي تتطلّب حسابات خدمة، لذا لا يظهر في صفحات المستندات الخاصة بهذه الواجهات.
عرض الإصدار الموسّع من "مستكشف واجهات برمجة التطبيقات"
يحتوي الإصدار الموسّع من "مستكشف واجهات برمجة التطبيقات" على عيّنات من الرموز البرمجية بلغة cURL وHTTP وربما غيرها. لعرض النسخة الموسّعة من "مستكشف واجهات برمجة التطبيقات"، انقر على رمز "ملء الشاشة" fullscreen.
تنفيذ طريقة
يتيح لك "مستكشف واجهات برمجة التطبيقات" إدخال المَعلمات المطلوبة والمَعلمات الاختيارية ونص الطلب الخاص بطُرق واجهة برمجة التطبيقات، إذا كان ذلك منطبقًا. بالنسبة إلى العديد من طرق REST، مثل طرق القائمة، ما عليك سوى ملء حقل واحد أو حقلين قبل أن تتمكّن من تنفيذ الطريقة. على سبيل المثال، لا تتطلّب طريقة
books.volumes.list
في Books API سوى مَعلمة طلب بحث (q) لإدراج الكتب. لتجربة طريقة
books.volumes.list، اتّبِع الخطوات التالية:
إذا لم يظهر "مستكشف واجهات برمجة التطبيقات"، انقر على جرِّبها.
في الحقل q، اكتب ألعاب الجوع (بدون أي علامات اقتباس أو رموز خاصة).
انتقِل إلى أسفل الصفحة وانقر على تنفيذ.
(اختياري) تطلب منك شاشة تسجيل الدخول إلى Google اختيار حساب Google.
(اختياري) سيظهر لك مربّع حوار يطلب منك الحصول على إذن من Google للسماح له بـ "إدارة كتبك". انقر على سماح. تظهر النتائج أسفل الزر "تنفيذ".
إذا عرضت أداة APIs Explorer النتيجة 200، يعني ذلك أنّ الطريقة نجحت.
تحديد المشاكل في "مستكشف واجهات برمجة التطبيقات" وحلّها
تلقّيت الخطأ 401 أو 403
إذا ظهر لك الخطأ 401 أو 403 عند تنفيذ إحدى الطرق باستخدام "مستكشف واجهات برمجة التطبيقات"، من المحتمل أن يكون ذلك بسبب مشكلة في أحد ما يلي:
استخدام نوع التفويض الخاطئ (مفتاح واجهة برمجة التطبيقات بدلاً من OAuth 2.0)
جرِّب تغيير نوع التفويض.
أنت تستخدم بروتوكول OAuth 2.0، ولكن بنطاق ضيق جدًا. جرِّب استخدام نطاق أوسع.
لا يظهر مربّع حوار التفويض
يستخدم "مستكشف واجهات برمجة التطبيقات" نافذة منبثقة لمنح إذن الوصول إلى بياناتك الخاصة. إذا كان متصفّحك يحظر النوافذ المنبثقة، لن تظهر هذه النافذة المنبثقة ولن تتمكّن من منح الإذن بالوصول.
إذا نقرت على السماح في مربّع حوار التفويض ولم يحدث أي شيء، حاوِل تغيير إعدادات النوافذ المنبثقة في المتصفّح لتفعيلها.
تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eThe APIs Explorer allows you to test API methods directly in the documentation by providing parameters and executing requests.\u003c/p\u003e\n"],["\u003cp\u003eTo use the APIs Explorer with methods requiring authorization, you need to generate and use your own credentials.\u003c/p\u003e\n"],["\u003cp\u003eThe expanded APIs Explorer provides code samples in various formats like cURL and HTTP for easier integration.\u003c/p\u003e\n"],["\u003cp\u003eIf you encounter a 401 or 403 error, verify the authorization type and scope, as they are the most common causes.\u003c/p\u003e\n"],["\u003cp\u003eThe APIs Explorer uses popups for authorization, so ensure your browser settings allow them to function correctly.\u003c/p\u003e\n"]]],[],null,["# Display the APIs Explorer and execute a method\n\nOn most documentation pages, a condensed APIs Explorer is visible on the\nright-hand side of the screen. If the APIs Explorer isn't visible, click\n**Try it!** to display the condensed version of the APIs Explorer.\n\nIf **Try it!** doesn't appear on the right-hand side of a reference\ndocumentation page, the method isn't supported by the APIs Explorer. For\nexample, the APIs Explorer isn't compatible with APIs that require service\naccounts, so it doesn't appear on documentation pages for those APIs.\n\nDisplay the expanded version of the APIs Explorer\n-------------------------------------------------\n\nThe expanded version of the APIs Explorer contains cURL, HTTP, and possibly\nother code samples. To display the expanded version of the APIs Explorer,\nclick Full screen fullscreen.\n| **Note:** To run the code samples, you must generate and use your own authorization credentials. For an explanation of how to create a project and generate credentials, refer to your specific Google API's documentation.\n\nExecute a method\n----------------\n\nThe APIs Explorer lets you enter required parameters, optional parameters,\nand, if applicable, a request body for API methods. For many REST methods,\nsuch as list methods, you only need to fill one or two fields before you can\nexecute the method. For example, the Books API's\n[`books.volumes.list`](/books/docs/v1/reference/volumes/list)\nmethod only requires a query parameter (`q`) to list books. To try the\n[`books.volumes.list`](/books/docs/v1/reference/volumes/list)\nmethod:\n\n1. Navigate to [`books.volumes.list`](/books/docs/v1/reference/volumes/list).\n2. If the APIs Explorer isn't displayed, click **Try it!**\n3. In the **`q`** field, type *Hunger Games* (without any quotes or special characters).\n4. Scroll down and click **Execute**.\n5. (optional) A Google sign-in screen asks you to select a Google account.\n6. (optional) A Google authorization dialog asks you if it's okay to \"Manage your books.\" Click *Allow*. The results appear below the Execute button.\n\nIf the APIs Explorer shows a result of 200, then the method was successful.\n| **Note:** After you allow the authorization screen to make an authorized request, the APIs Explorer is authorized to make other requests until the credentials expire. Therefore, you don't see the authorization screen for every subsequent method call. For further information on credentials, see [Test with different credential types and scopes](/explorer-help/authorization-and-authentication).\n\nTroubleshoot APIs Explorer issues\n---------------------------------\n\n### You received a 401 or 403 error\n\nIf you're getting a 401 or 403 error when executing a method using the APIs\nExplorer, it is likely due to a problem with one of the following:\n\n- You're using the wrong authorization type (API key instead of OAuth 2.0). Try switching the authorization type.\n- You're using OAuth 2.0, but with too narrow a scope. Try using a broader scope.\n\n### Authorization dialog doesn't appear\n\nThe APIs Explorer uses a popup to grant access to your private data. If your\nbrowser blocks popups, this popup won't appear and you won't be able to grant\naccess.\n\nIf you click **Allow** in the authorization dialog and nothing happens, try\nchanging your browser's popup settings to enable popups."]]