اعتبارًا من 8 سبتمبر 2025، يجب أن يحدّد كل عنصر جديد في الحملة ما إذا كان سيعرض إعلانات سياسية في الاتحاد الأوروبي أم لا. ستتعذّر عمليات تحميل واجهة برمجة التطبيقات "مساحة العرض والفيديو 360" وملفات SDF التي لا تقدّم بيانات الإفصاح. يمكنك الاطّلاع على صفحة الإيقاف النهائي لمزيد من التفاصيل حول كيفية تعديل عملية الدمج لإجراء هذا البيان.
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
هناك العديد من السيناريوهات التي قد تواجه فيها أخطاء عند التعامل مع واجهة برمجة التطبيقات
Display & Video 360 API. وقد تكون هذه الأخطاء مرتبطة بخطأ في الرمز البرمجي أو إدخال مستخدم غير صالح،
أو حتى مشكلة في واجهة برمجة التطبيقات نفسها. بغض النظر عن السبب، فإنّ معرفة كيفية تحديد الصعوبات المتعلّقة بالأخطاء وحلّها هو جزء مهم من عملية التطوير. سيقدّم لك هذا الدليل
بعض النصائح حول أفضل الممارسات لمساعدتك في البدء.
مراجعة الأساسيات
راجِع دليل المتطلبات الأساسية. تأكَّد من أنّه بإمكانك الوصول إلى
"مساحة العرض والفيديو 360" ومشروع واجهة برمجة تطبيقات تم ضبطه بشكلٍ صحيح.
إذا كان الردّ يتضمّن أخطاء HTTP، احرص على مراجعتها بعناية
والتأكّد من أنّ الطلب يتم توجيهه إلى واجهة برمجة التطبيقات والخدمة الصحيحتَين.
راجِع دليل التفويض. تأكَّد من أنّ طلبك يحتوي على
بيانات اعتماد OAuth 2.0 اللازمة.
تأكَّد من استخدام بيانات الاعتماد الصحيحة. اطّلِع على
دليل إعداد تطبيقك للحصول على تفاصيل عن إنشاء
بيانات اعتماد المصادقة. يمكنك أيضًا تمرير رمز الوصول إلى
نقطة نهاية tokeninfo في Google OAuth2 API للتأكّد من أنّه
تم إصداره لمشروع واجهة برمجة التطبيقات الصحيح وتم تفويضه بالنطاقات الصحيحة:
عندما تواجه واجهة برمجة التطبيقات خطأ، تعرِض عادةً استجابة JSON تحتوي على
كائن error. يقدّم هذا العنصر سياقًا إضافيًا حول
الخطأ المحدّد الذي حدث.
{"error":{"code":404,"message":"Resource type LINE_ITEM does not exist: advertisers/1/lineItems/1","status":"NOT_FOUND"}}
عادةً ما تحتوي محتويات عنصر error على معلومات كافية ل
مساعدتك في تحديد المشكلة. إذا لم يكن الأمر كذلك، قد تحتاج إلى إجراء بعض الخطوات الإضافية
للتعرّف على معنى الخطأ.
البحث عن الأخطاء
راجِع قسم الأخطاء الشائعة الذي يقدّم
تفاصيل عن بعض الأخطاء الأكثر شيوعًا.
إذا لم يكن الخطأ مُدرَجًا في قسم الأخطاء الشائعة، يمكنك الرجوع إلى
المستندات المرجعية ومحاولة البحث عن رمز الخطأ
والحالة والرسالة.
إذا واجهت أي أخطاء غير موثّقة، يُرجى إعلامنا بها.
تحديد السبب الأساسي
في هذه المرحلة، تكون قد حدّدت الخطأ وفهمت معناه. إذا لم يكن الأمر كذلك،
يمكنك الرجوع إلى فهم الأخطاء أو الانتقال إلى الحصول على المساعدة إذا كنت تعتقد أنّك واجهت خطأً في واجهة برمجة التطبيقات
لا يمكنك حلّه بنفسك.
قبل أن تتمكّن من إصلاح الخطأ، عليك تحديد سببه. في أغلب الأحيان،
يرجع ذلك إلى خطأ في الرمز أو قيمة إدخال غير صالحة.
لتحديد ما إذا كانت المشكلة مرتبطة بخطأ في الرمز البرمجي، عليك أولاً التحقّق من أنّ الرمز البرمجي يعمل على النحو المطلوب. كخطوة أولى،
ننصح بمراجعة قسم الرمز البرمجي المسؤول عن إرسال طلب العميل الذي تعذّر تنفيذه للتحقّق من المشاكل الواضحة. في بعض الحالات، قد يكون من الضروري استخدام
أداة تصحيح الأخطاء للانتقال من سطر إلى سطر في الرمز البرمجي لضمان عمله
بشكل صحيح.
إنّ فحص طلبات HTTP هو طريقة أخرى مفيدة لتحديد الأخطاء المحتملة، بالإضافة إلى حالات الإدخال غير الصالح. يمكن برمجة العديد من مكتبات البرامج الرسمية لتسجيل طلبات HTTP واستجاباتها. راجِع مستندات مكتبة البرامج التي تختارها للحصول على مزيد من التفاصيل. يمكن أيضًا استخدام خادم وكيل HTTP، مثل
Charles أو Squid أو Fiddler
لتسجيل سجلات الطلبات والاستجابات. بعد الحصول على هذين
السجلّين، راجِعهما للتأكّد من أنّ قيم مَعلمات الطلب التي يقدّمها
تطبيقك صحيحة وتتطابق مع ما تتوقّعه.
بعد تحديد الخلل أو الإدخال غير الصالح المسؤولَين عن حدوث الخطأ،
من المفترض أن يكون الحلّ واضحًا. إذا واجهت مشكلة أو لم تكن متأكّدًا من أفضل طريقة لحلّ
المشكلة، يمكنك استخدام المعلومات التي جمعتها حتى الآن عند طلب
المساعدة.
الحصول على المساعدة
إذا لم تتمكّن من حلّ خطأ بنفسك، يمكنك التواصل مع فريق الدعم
من خلال هذا النموذج المتوفّر في مركز مساعدة "مساحة العرض والفيديو 360 ".
عند ملء هذا النموذج، يجب تضمين أكبر قدر ممكن من المعلومات
حول المشكلة التي تواجهك وخطوات تحديد المشاكل وحلّها التي سبق أن
اتخذتها. إليك بعض المعلومات المفيدة التي يجب تضمينها:
سجلّات طلبات HTTP واستجابتها احرص على إخفاء المعلومات الحسّاسة،
مثل رموز الوصول عبر بروتوكول OAuth 2.0 وعناوين البريد الإلكتروني وما إلى ذلك.
مقتطف الرمز إذا كان بإمكانك حصر المشكلة في قسم معيّن من
الرمز البرمجي أو إذا كنت تشتبه في أنّ المشكلة مرتبطة باللغة، يمكنك تضمين مقتطف صغير لشرح ما تفعله.
معلومات إضافية، مثل إصدار وقت التشغيل/المترجم والمنصة،
قد تكون مفيدة للمستخدمين الآخرين الذين يحاولون إعادة إنتاج المشكلة
حلّ المشكلة
بعد تحديد سبب المشكلة واقتراح حلّ لها، حان وقت تنفيذ الحلّ. اختبِر الحلّ في بيئة تحت التحكّم (مثل شريك أو معلِن تم إعداده خصيصًا للاختبار) مع مجموعة من الإدخالات الصالحة وغير الصالحة قبل نشره في مرحلة الإنتاج.
تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eThis guide provides best practice tips for troubleshooting errors encountered when working with the Display & Video 360 API, covering common causes like bugs, invalid input, or API issues.\u003c/p\u003e\n"],["\u003cp\u003eWhen an error occurs, the API typically returns a JSON response with an \u003ccode\u003eerror\u003c/code\u003e object containing details about the issue; if not, review basic setup steps.\u003c/p\u003e\n"],["\u003cp\u003eIf the error isn't readily understood, consult the common errors section, reference documentation, or the Display & Video 360 help center for field validation and limits.\u003c/p\u003e\n"],["\u003cp\u003eTo identify the root cause, examine your code, validate input values using HTTP request logs, and use debugging tools to pinpoint the source of the problem.\u003c/p\u003e\n"],["\u003cp\u003eIf you're unable to resolve the error, contact the support team with detailed information about the issue, troubleshooting steps taken, and relevant code snippets.\u003c/p\u003e\n"]]],[],null,["# Troubleshooting\n\nThere are many scenarios where you may encounter errors when working with the\nDisplay \\& Video 360 API. These could relate to a bug in your code, invalid user input,\nor even an issue with the API itself. Whatever the reason, knowing how to\ntroubleshoot errors is an important part of the development process. This guide\nwill provide some best practice tips to get you started.\n\nReviewing the basics\n--------------------\n\n1. Review the [prequisites guide](/display-video/api/guides/getting-started/overview#prerequisites). Ensure you have access to Display \\& Video 360 and a properly configured API project.\n2. If your response contains HTTP errors, make sure you review these carefully and ensure that the request is being made to the correct API and service.\n3. Review the [authorization guide](/display-video/api/guides/how-tos/authorizing). Ensure your request contains the necessary OAuth 2.0 credentials.\n4. Verify that you're using the correct credentials. See the\n [Set Up Your Application guide](/display-video/api/guides/getting-started/configure) for details on generating\n authentication credentials. You may also pass your access token to the\n [Google OAuth2 API's tokeninfo endpoint](//developers.google.com/apis-explorer/#p/oauth2/v2/oauth2.tokeninfo) to verify that it is\n issued to the correct API project and authorized for the correct scope(s):\n\n POST https://www.googleapis.com/oauth2/v2/tokeninfo?access_token={YOUR_ACCESS_TOKEN}\n\n 200 OK\n\n {\n \"issued_to\": \"{API_PROJECT_CLIENT_ID}\",\n \"audience\": \"...\",\n \"scope\": \"{API_SCOPES}\",\n \"expires_in\": ...\n }\n\nUnderstanding errors\n--------------------\n\nWhen the API encounters an error, it normally returns a JSON response containing\nan `error` object. This object provides additional context about the specific\nerror that was encountered. \n\n {\n \"error\": {\n \"code\": 404,\n \"message\": \"Resource type LINE_ITEM does not exist: advertisers/1/lineItems/1\",\n \"status\": \"NOT_FOUND\"\n }\n }\n\n| **Note:** If you receive an error response that does not include an `error` object, there's a chance the error is not coming from the Display \\& Video 360 API. Please refer back to the section on [reviewing the basics](#basics) before continuing.\n\nUsually the contents of the `error` object will contain enough information to\nhelp you identify what's gone wrong. If not, you may need to do some additional\nresearch to figure out what the error means.\n\n### Researching errors\n\n1. Refer to the section on [common errors](/display-video/api/guides/best-practices/errors), which provides\n details for some of the most frequently encountered errors.\n\n2. If the error isn't covered in the common errors section, refer to the\n [reference documentation](/display-video/api/reference/rest) and try searching for the error code,\n status, and message.\n\n3. If you come across any errors that aren't documented, please let us know.\n\n| **Key Point:** If the error you've encountered relates to field validation or a partner/advertiser limit, review the [Display \\& Video 360 help center](//support.google.com/displayvideo) for more information. These rules and limits are inherited from Display \\& Video 360 and are not enforced by the Display \\& Video 360 API itself.\n\nIdentifying the root cause\n--------------------------\n\nBy this point you've identified the error and understand what it means. If not,\nhead back to [understanding errors](#understand) or jump ahead to\n[getting help](#get-help) if you believe you've come across an error in the API\nthat you can't fix yourself.\n\nBefore you can fix the error, you'll need to identify what's causing it. Often\nthis will be a bug in your code or an invalid input value.\n\nTo determine whether the issue is related to a bug in your code, you\nshould first verify that your code is working as intended. As a first step,\nconsider reviewing the section of code responsible for making the failing\nrequest to check for obvious issues. In some cases it may be necessary to use a\ndebugging tool to step through the code line-by-line to ensure it's functioning\ncorrectly.\n\nExamining HTTP requests is another useful way to identify potential bugs, as\nwell as cases of invalid input. Many of the official client libraries can be\nconfigured to log HTTP requests and responses; review the documentation for your\nlibrary of choice for more details. An HTTP proxy such as\n[Charles](//www.charlesproxy.com/), [Squid](//www.squid-cache.org/), or [Fiddler](//www.telerik.com/fiddler)\ncan also be used to capture request and response logs. Once you obtain these\nlogs, review them to ensure that the request parameter values being provided by\nyour application are correct and match what you expect.\n\nOnce you identify the bug or invalid input responsible for causing the error,\nthe fix will hopefully be obvious. If you're stuck or unsure how best to fix the\nproblem, however, you can use the information you've gathered so far when\ngetting help.\n\n### Getting help\n\nIf you aren't able to resolve an error yourself, you can contact our support\nteam via this [form](/display-video/api/support/contact) located in the Display \\& Video 360 help center.\n\nWhen filling out this form, you should include as much information as possible\nabout the issue you're facing and the troubleshooting steps you've already\ntaken. Useful information to include:\n\n- HTTP request and response logs. Make sure to redact sensitive information such as OAuth 2.0 access tokens, email addresses, etc.\n- Code snippet. If you're able to isolate the issue to a particular section of code or suspect the issue is language-specific, include a small snippet to illustrate what you're doing.\n- Additional information, such as runtime/interpreter version and platform, which may be useful for others attempting to reproduce the issue.\n\nFixing the issue\n----------------\n\nOnce you've identified the cause of the issue and come up with a solution, it's\ntime to implement a fix. Whenever possible, test your fix in a controlled\nenvironment (such as a partner or advertiser configured specifically for\ntesting) against a range of both good and bad inputs before deploying to\nproduction."]]