تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
في هذه الخطوة، عليك تحديد حساب على "إعلانات Google" لإجراء طلبات البيانات من واجهة برمجة التطبيقات إليه. يمكن أن يكون الحساب حسابًا للإنتاج (مباشرًا) أو حسابًا تجريبيًا. ولكل نهج مزاياه وعيوبه.
حسابات الإنتاج
حسابات الاختبار
الإيجابيات
تسهيل كتابة واختبار الرمز البرمجي الذي يعمل مع محتوى حساب معيّن
تسهيل كتابة الرموز واختبارها لمعالجة بيانات التقارير المباشرة
لا تعرض الحسابات الاختبارية إعلانات، وبالتالي لن تؤثر أخطاء البرمجة في حملاتك المباشرة.
تعمل هذه الطريقة مع الرموز المميزة للمطوّرين التي لديها مستوى الوصول إلى الاختبار.
العيوب
قد يؤدي خطأ برمجي في مرحلة التطوير إلى التأثير في عرض الحملات المباشرة، ما يؤدي إلى مشاكل مثل ضعف أداء الحملة أو العرض غير الصحيح أو الخسائر المالية.
يجب أن يكون رمز المطوِّر المميز على مستوى "إذن الوصول الأساسي" على الأقل
لإجراء طلبات البيانات من واجهة برمجة التطبيقات.
يجب إعادة إنشاء الحملات داخل الحسابات التجريبية لاختبار الرمز الذي يعمل مع محتوى حساب معيّن.
بما أنّ الحسابات التجريبية لا تعرض إعلانات، لا تتوفّر الميزات المرتبطة بالعرض المباشر، مثل إحصاءات التقارير أو أخطاء انتهاك السياسة أو معالجة عمليات استيراد الإحالات الناجحة بلا إنترنت، ما يصعّب اختبار هذه الميزات.
ننصحك باستخدام حساب تجريبي أثناء تطوير تطبيقك عند الإمكان. للحصول على التعليمات، يُرجى الاطّلاع على إنشاء حسابات وحملات تجريبية.
يمكنك بدلاً من ذلك إعداد حساب إنتاج بميزانية حساب منخفضة، مثل دولار واحد في اليوم، وذلك بشكل صريح لاختبار الميزات التي لا يتيحها حساب الاختبار.
اختيار مجموعة الميزات
عند اختيار حساب لإجراء طلب بيانات من واجهة برمجة التطبيقات، يجب مراعاة قائمة الميزات التي تريد استخدامها مع واجهة برمجة التطبيقات. حتى إذا اخترت استخدام حساب إنتاج، ستتوفّر بعض الميزات الخاصة بالحساب، مثل:
لاستخدام ميزات الفوترة، يجب أن يكون لديك حساب يستخدم نظام الفواتير الشهرية.
قد يتم حظر بعض الميزات الجديدة في الحساب من خلال قوائم السماح.
قبل الانتهاء من إعداد الحساب لإجراء طلبات بيانات من واجهة برمجة التطبيقات، راجِع مستندات الميزة المحدّدة للتأكّد من أنّ الميزة لا تتضمّن قيودًا إضافية.
تحديد رقم تعريف العميل المستخدَم في تسجيل الدخول ورقم تعريف العميل
لإجراء طلب إلى واجهة برمجة التطبيقات لأحد عملاء "إعلانات Google"، يجب منح إذن الوصول والأذونات المناسبة لحساب الخدمة إلى حساب العميل، إما مباشرةً أو من خلال حساب إداري مرتبط. لإجراء ذلك، يجب أن يكون لديك إذن وصول إداري إلى حساب العميل.
ابدأ بتسجيل الدخول إلى حسابك على "إعلانات Google" بصفتك مشرفًا. في بعض الحالات، قد يكون لديك أكثر من حساب عميل واحد للاختيار من بينها. يحدّد الحساب الذي تختاره رقم تعريف العميل المستخدَم في تسجيل الدخول، وهو عنوان مطلوب لبعض طلبات البيانات من واجهة برمجة التطبيقات.
بعد تحديد عميل "إعلانات Google" الذي سيتم إجراء طلبات البيانات من واجهة برمجة التطبيقات إليه، سجِّل التفاصيل التالية:
الرقم التعريفي للعميل المكوّن من 10 أرقام والخاص بحساب العميل الذي تخطّط لإجراء طلبات إلى واجهة برمجة التطبيقات فيه. ويُشار إلى هذا النوع من العملاء أحيانًا باسم "العميل النشط".
رقم تعريف العميل المكوّن من 10 أرقام والذي يتم استخدامه لتسجيل الدخول إلى حساب العميل الذي تم تسجيل الدخول إليه.
إذا كنت مسجّلاً الدخول إلى حساب العميل الأساسي، سيكون رقم تعريف العميل المستخدَم في تسجيل الدخول هو نفسه رقم تعريف العميل. إذا سجّلت الدخول إلى حساب إداري تابع للعميل المشغّل، يكون الرقم التعريفي للعميل الذي سجّل الدخول هو الرقم التعريفي للعميل التابع للحساب الإداري.
منح الإذن بالوصول إلى حساب الخدمة
أثناء تسجيل الدخول إلى حسابك على "إعلانات Google" بصفتك مشرفًا، انتقِل إلى المشرف > الوصول والأمان.
انقر على الزر + ضمن علامة التبويب المستخدمون.
اكتب عنوان البريد الإلكتروني لحساب الخدمة في مربّع الإدخال البريد الإلكتروني. اختَر مستوى الوصول المناسب إلى الحساب، ثم انقر على الزر إضافة حساب. يُرجى العِلم أنّ مستوى الوصول عبر البريد الإلكتروني غير متاح لحسابات الخدمة.
يتم منح حساب الخدمة إذن الوصول.
بشكلٍ تلقائي، لا يمكنك منح حساب الخدمة إذن وصول المشرف. إذا كانت طلبات البيانات من واجهة برمجة التطبيقات تتطلّب إذن وصول المشرف، يمكنك ترقية إذن الوصول باتّباع الخطوات التالية.
انقر على سهم القائمة المنسدلة بجانب مستوى الوصول الخاص بحساب الخدمة في عمود مستوى الوصول.
تاريخ التعديل الأخير: 2025-08-27 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-08-27 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eChoose a Google Ads account (production or test) to make API calls, noting its email address for generating OAuth 2.0 refresh tokens.\u003c/p\u003e\n"],["\u003cp\u003eTest accounts are recommended for development to prevent affecting live campaigns; however, they don't support features related to live serving.\u003c/p\u003e\n"],["\u003cp\u003eProduction accounts, with a low budget, can be used to test features unsupported by test accounts, but a programming bug can affect live campaigns.\u003c/p\u003e\n"],["\u003cp\u003eEnsure the selected account supports the desired features as some features have account-specific restrictions.\u003c/p\u003e\n"],["\u003cp\u003eTo make API calls, you need access to the customer account, the 10-digit customer ID, email address for OAuth 2.0 token generation, and the 10-digit login customer ID.\u003c/p\u003e\n"]]],[],null,["# Prepare the customer account\n\n**Note:** The current step of this tutorial depends on the [type of application](/google-ads/api/docs/get-started/choose-application-type) you are building. We strongly recommend using service account to make API calls. However, the user authentication option is also provided as an alternative. The rest of this tutorial will be customized based on your choice. \nService accounts User authentication\n\nIn this step, you identify a Google Ads account to make API calls to. The account\ncan either be a production (live) account or a test account. Each approach has\nits advantages and disadvantages.\n\n|---------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| | ##### Production accounts | ##### Test accounts |\n| ##### Advantages | - Easier to write and test code that works against specific account contents. - Easier to write and test code that processes live reporting data. | - Test accounts *don't* serve ads, hence programming bugs won't affect your live campaigns. - Works with developer tokens that have Test Access level. |\n| ##### Disadvantages | - A programming bug in the development phase could affect live campaign serving, leading to issues such as poor campaign performance, incorrect serving, or financial losses. - The developer token should have at least the Basic Access level to in order to make API calls. | - You must reconstruct campaigns within test accounts to test code that works against specific account contents. - Since test accounts don't serve ads, features related to live serving such as reporting stats, policy violation errors, or processing offline conversion imports are not supported, making it difficult to test those features. |\n\nWe recommend using a test account while developing your application when\npossible. For instructions, see [Create test accounts and\ncampaigns](/google-ads/api/docs/best-practices/test-accounts#create).\n\nAn alternative is to set up a production account with a low account budget,\nsuch as $1/day, explicitly for testing features that are not supported by a\ntest account.\n\nChoice of feature set\n---------------------\n\nWhen choosing an account for making API call, an additional consideration is\nthe list of features you'd want to use with the API. Even if you choose to use\na production account, there are some features that are account-specific, for\nexample:\n\n- For billing features, you need an account that is on monthly invoicing.\n- Some new features in the account might be restricted by allowlists.\n\nBefore finalizing the account to make API calls against, check the\ndocumentation of the specific feature to make sure that the feature doesn't\nhave additional restrictions.\n\nIdentify the login customer ID and customer ID\n----------------------------------------------\n\nTo make an API call to a Google Ads customer, you must grant access and\nappropriate permissions to your service account to the customer account\neither directly or through a linked manager account. To do this, you need\nadministrator access to the customer account.\n\nStart by signing in to your Google Ads account as an administrator. In some cases,\nyou might have more than one customer account to choose from. The account you\nselect establishes the login customer ID, which is a required header for some\nAPI calls.\n\nAfter you've identified the Google Ads customer to make API calls to, note the\nfollowing details:\n\n- The 10-digit customer ID of the customer account to which you plan to make\n API calls against. This is sometimes referred to as the operating customer.\n\n- The 10-digit login customer ID of the customer account you're signed in to.\n If you're signed in to the operating customer, the login customer ID is the\n same as the customer ID. If you signed into a manager account of the\n operating customer, the login customer ID is the customer ID of the manager\n account.\n\nGrant access to the service account\n-----------------------------------\n\n1. While signed in to your Google Ads account as an administrator, navigate to\n **Admin \\\u003e Access and security**.\n\n2. Click the **+** button under the **Users** tab.\n\n3. Type the service account email address into the **Email** input box. Select\n the appropriate level of account access level and click the **Add account**\n button. Note that Email access level is not supported for service accounts.\n\n4. The service account is granted access.\n\nBy default, you cannot grant administrator access to a service account. If your\nAPI calls require administrator access, you can upgrade the access as follows.\n\n1. Click the drop-down arrow next to the access level of the service account\n in the **Access level** column.\n\n2. Select **Admin** from the drop-down list."]]