در این قسمت، OAuth را با Google Ads API ابهام می کنیم و نشان می دهیم که چگونه می توانید کل فرآیند OAuth را تکمیل کنید و با استفاده از جریان برنامه دسکتاپ با REST API در کمتر از 20 ثانیه یک درخواست API ارائه دهید. ما همچنین چند اسکریپت مفید را برای تولید سریع نشانه های دسترسی و انجام درخواست های SearchStream به اشتراک خواهیم گذاشت.
جریان دسکتاپ با REST API
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-08-26 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-08-26 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eThe manual copy/paste method for authorization codes is deprecated and will stop working for existing clients on October 3, 2022.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers should transition to using a loopback IP address for a more secure and user-friendly authorization process.\u003c/p\u003e\n"],["\u003cp\u003eThis guide provides a quick demonstration of the OAuth process using the Desktop App flow with the Google Ads API, enabling users to make API requests in under 20 seconds.\u003c/p\u003e\n"],["\u003cp\u003eThe guide includes helpful scripts for generating access tokens and executing searchStream requests.\u003c/p\u003e\n"]]],[],null,["# Desktop Flow with the REST API\n\n| **Warning:** The option to manually copy/paste authorization codes described in this guide has been deprecated. New OAuth clients can no longer use this flow.\n|\n|\n| Existing OAuth clients that already use the manual copy/paste flow described below will continue\n| to work until Oct 3, 2022. See the [Google\n| Developers blog post](//developers.googleblog.com/2022/02/making-oauth-flows-safer.html#disallowed-oob) for more details.\n|\n| Use a [loopback\n| IP address](/identity/protocols/oauth2/native-app#redirect-uri_loopback) for a more reliable, secure, and user-friendly way to obtain\n| user authorization.\n\n\u003cbr /\u003e\n\nIn this episode, we'll demystify OAuth with the Google Ads API and demonstrate how you can complete the entire OAuth process and make an API request using the Desktop App flow with the REST API in under 20 seconds. We'll also share some useful scripts to quickly generate access tokens and perform searchStream requests.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e"]]