با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
درخواستها به ReachPlanService باید یک توکن توسعهدهنده تأیید شده، اعتبارنامه OAuth و یک شناسه مشتری ارائه کنند که اعتبار OAuth شما میتواند به آن دسترسی داشته باشد.
این راهنما جزئیات احراز هویت خاص ReachPlanService را پوشش می دهد. اگر قبلاً این کار را نکردهاید، ابتدا مراحل ذکر شده در شروع را کامل کنید، سپس به این نقطه بازگردید.
توکن توسعه دهنده و اعتبارنامه OAuth
علاوه بر راهنمایی ارائه شده توسط Get Start ، نکات زیر را در نظر داشته باشید:
رمز برنامهنویس شما باید برای اتصال به ReachPlanService در لیست مجاز باشد، حتی اگر قبلاً برای استفاده با سایر سرویسهای API Google Ads تأیید شده باشد. برای اطلاعات بیشتر، شرایط واجد شرایط بودن را ببینید.
برای اتصال به Google Ads API باید شرایط خدمات Google Ads API را بپذیرید.
کاربری که دارای نشانه بازخوانی OAuth شما است، تعیین می کند که کدام شناسه مشتری را می توانید در ReachPlanService جستجو کنید. این یکپارچه سازی شما را نشان می دهد و در زیر با جزئیات بیشتر توضیح داده شده است.
شناسه های مشتری
اکثر سرویسهای موجود در Google Ads API روی حسابها و کمپینهای Google Ads خاص کار میکنند. در نتیجه، بیشتر درخواستها هم به شناسه مشتری برای شناسایی حسابی که مدیریت میکنید یا درخواست میکنید و هم به اعتبارنامههای OAuth نیاز دارند که مجوز دسترسی به آن شناسه مشتری را دارند. با این حال، ReachPlanService برای فعالیتهای برنامهریزی ویدیویی است که ممکن است قبل از اینکه شناسه مشتری خاصی را که در آن کمپین را اجرا میکنید، بدانید، رخ دهد.
برای شرکایی که ابزارهایی را برای استفاده داخلی در سازمان خود می سازند، یکی از گزینه های زیر را توصیه می کنیم:
اگر برنامه ریزان شما به حساب های Google Ads مشتریان شما دسترسی ندارند : با استفاده از جریان برنامه نصب شده برای کاربری که به حساب مدیر رمز توسعه دهنده شما دسترسی دارد، اعتبارنامه OAuth ایجاد کنید. سپس برای هر تیمی که از ابزار شما استفاده میکند یک حساب Google Ads ایجاد یا دریافت کنید و آنها را به حساب مدیر خود پیوند دهید . هنگام درخواست برای ReachPlanService ، شناسه مشتری مربوط به تیم کاربر را ارائه دهید.
اگر برنامه ریزان شما به یک حساب مدیر Google Ads دسترسی دارند که حساب های مشتریان شما را مدیریت می کند : جریان برنامه وب را پیاده سازی کنید تا به برنامه شما اجازه دهید از اعتبارنامه OAuth برنامه ریزان شما استفاده کند. سپس می توانید شناسه مشتری مربوط به مشتری طرح خود را وارد کنید.
برای شرکایی که ابزاری برای کاربران خارجی میسازند، روشهای مشابهی را توصیه میکنیم:
اعتبارنامه OAuth را با استفاده از جریان برنامه نصب شده برای کاربری که به حساب مدیر توکن توسعه دهنده شما دسترسی دارد، ایجاد کنید. برای هر مشتری خارجی یک حساب Google Ads ایجاد کنید و آنها را به حساب مدیر خود پیوند دهید . سپس ابزار خود را به گونه ای پیکربندی کنید که شناسه مشتری متناظر مشتری را هنگام ایجاد طرح ارائه کند.
به کاربران خود این امکان را بدهید که با استفاده از جریان برنامه وب، ابزار شما را به حساب های خود دسترسی دهند. هنگامی که کاربر اجازه میدهد، از CustomerService استفاده کنید تا فهرستی از حسابهای Google Ads را که میتوانند به آن دسترسی داشته باشند ارائه دهید.
هدف این است که اطمینان حاصل شود که برنامه ریزان هنگام استفاده از ReachPlanService کمترین اصطکاک ممکن را دارند. قبل از اینکه API را یکپارچه کنید، یکی از این دو رویکرد را با توجه به موقعیت خود انتخاب کنید و چند شناسه مشتری را برای آزمایش شناسایی کنید. اگر شک دارید، از اولین رویکرد پیشنهادی برای نوع ابزار خود استفاده کنید.
تاریخ آخرین بهروزرسانی 2025-08-26 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-08-26 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eThe ReachPlanService API requires allowlisted access, an approved developer token, OAuth credentials, and a valid customer ID.\u003c/p\u003e\n"],["\u003cp\u003eYour developer token needs to be specifically allowlisted for ReachPlanService, and you must accept the Google Ads API Terms of Service.\u003c/p\u003e\n"],["\u003cp\u003eCustomer ID selection depends on whether planners have access to client accounts or use a manager account, impacting OAuth credential flow.\u003c/p\u003e\n"],["\u003cp\u003ePartners building internal tools can choose between using a manager account with linked team accounts or leveraging planners' existing manager account access.\u003c/p\u003e\n"],["\u003cp\u003ePartners building external tools can use a similar approach, either linking client accounts to a manager account or utilizing the web application flow for direct user account access.\u003c/p\u003e\n"]]],[],null,["# Authentication\n\n| **Important:** This feature is available to allowlisted accounts only. Contact your Google representative if you need access to the feature.\n\n\u003cbr /\u003e\n\nRequests to the [`ReachPlanService`](/google-ads/api/reference/rpc/v21/ReachPlanService) must\nsupply an approved developer token, OAuth credentials, and a customer ID that\nyour OAuth credentials can access.\n\nThis guide covers authentication details specific to\n[`ReachPlanService`](/google-ads/api/reference/rpc/v21/ReachPlanService). If you haven't already,\nfirst complete the steps outlined in [Get\nstarted](/google-ads/api/docs/get-started/introduction), then come back to this point.\n\nDeveloper token and OAuth credentials\n-------------------------------------\n\nIn addition to the guidance presented by [Get\nstarted](/google-ads/api/docs/get-started/introduction), keep the following points in mind:\n\n1. Your developer token must be allowlisted to connect to the [`ReachPlanService`](/google-ads/api/reference/rpc/v21/ReachPlanService), even if it's already approved for use with other Google Ads API services. For more information, see the [eligibility\n requirements](/google-ads/api/docs/reach-forecasting#eligibility).\n2. You must accept the Google Ads API Terms of Service in order to connect to the Google Ads API.\n3. The user who owns your OAuth refresh token determines which customer IDs you can query in the [`ReachPlanService`](/google-ads/api/reference/rpc/v21/ReachPlanService). This informs your integration and is explained in more details below.\n\nCustomer IDs\n------------\n\nMost services within the Google Ads API operate on specific Google Ads accounts and\ncampaigns. As a result, most requests require both a customer ID to identify\nthe account you're managing or querying, and [OAuth\ncredentials](/google-ads/api/docs/oauth/overview) that have permission to access that\ncustomer ID. However, [`ReachPlanService`](/google-ads/api/reference/rpc/v21/ReachPlanService)\nis meant for video planning activities that might occur before you know the\nspecific customer ID where you would run a campaign.\n\nFor partners who build tools for internal use in their organization, we\nrecommend one of the following choices:\n\n1. **If your planners don't have access to your clients' Google Ads accounts** :\n Generate OAuth credentials using the *installed application flow* for a user\n with access to your developer token's manager account. Then create or obtain\n a Google Ads account for each team that uses your tool, and [link them to\n your manager account](//support.google.com/google-ads/answer/7459601). When making requests to\n [`ReachPlanService`](/google-ads/api/reference/rpc/v21/ReachPlanService) provide the customer ID\n corresponding to a user's team.\n\n2. **If your planners have access to a Google Ads manager account that manages\n your clients' accounts** : Implement the *web application flow* to allow your\n app to use your planners' OAuth credentials. Then you can pass in the\n customer ID corresponding to the customer of your plan.\n\nFor partners who build a tool for external users, we recommend similar\napproaches:\n\n1. Generate OAuth credentials using the *installed application flow* for a user\n with access to your developer token's manager account. Create a Google Ads\n account per external client and [link them to your manager\n account](//support.google.com/google-ads/answer/7459601). Then configure your tool to provide a client's\n corresponding customer ID when they're generating plans.\n\n2. Give your users the ability to grant your tool access to their accounts\n by using the *web application flow* . Once a user grants permission, use the\n [`CustomerService`](/google-ads/api/docs/account-management/listing-accounts) to provide\n them with a list of Google Ads accounts they can access.\n\nThe goal is to ensure planners have the lowest possible friction when using the\n[`ReachPlanService`](/google-ads/api/reference/rpc/v21/ReachPlanService). Before you integrate the\nAPI, select one of the two approaches according to your situation and identify\na few customer IDs to test. If in doubt, use the first suggested approach for\nyour tool type."]]