অনুমোদন সেট আপ করুন
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
সার্চ বিজ্ঞাপন 360 এপিআই প্রমাণীকরণের জন্য একটি OAuth 2.0 অ্যাক্সেস টোকেন নির্দিষ্ট করার জন্য সমস্ত অনুরোধের প্রয়োজন। টোকেন জেনারেট করতে এবং Search Ads 360 API-এ পাস করতে আপনি যেকোনও স্ট্যান্ডার্ড OAuth 2.0 প্রমাণীকরণ ওয়ার্কফ্লো অনুসরণ করতে পারেন। আমরা নীচে বর্ণিত ওয়ার্কফ্লো সুপারিশ করি কারণ এটি সম্পূর্ণ স্বয়ংক্রিয় রূপান্তর আপলোড এবং প্রতিবেদন ডাউনলোডের জন্য উপযুক্ত৷
নীচে বর্ণিত কর্মপ্রবাহের বিকল্পগুলির জন্য, ইনস্টল করা অ্যাপ্লিকেশনগুলির জন্য OAuth 2.0 ব্যবহার করা বা সার্ভার থেকে সার্ভার অ্যাপ্লিকেশনগুলির জন্য OAuth 2.0 ব্যবহার করা দেখুন৷ আপনি যদি একটি বিকল্প ওয়ার্কফ্লো ব্যবহার করেন, আপনি যখন একটি OAuth 2.0 অনুমোদন কোড অনুরোধ করেন তখন scope
প্যারামিটার হিসাবে নিম্নলিখিত মানটি নির্দিষ্ট করুন:
https://www.googleapis.com/auth/doubleclicksearch
আপনি সার্ভার থেকে সার্ভার রুট অনুসরণ করলে, সার্চ বিজ্ঞাপন 360 ব্যবহারকারী হিসেবে পরিষেবা অ্যাকাউন্ট যোগ করুন।
প্রস্তাবিত অনুমোদন কর্মপ্রবাহ
- Google API কনসোলে যান এবং আপনার প্রকল্প নির্বাচন করুন।
আপনি যদি ইতিমধ্যে একটি Google API কনসোল প্রকল্প এবং OAuth শংসাপত্র তৈরি না করে থাকেন, তাহলে আপনার ক্লায়েন্টের জন্য একটি Google API কনসোল প্রকল্প এবং OAuth শংসাপত্র তৈরি করুন এর নির্দেশাবলী অনুসরণ করুন৷
আপনার প্রকল্পের OAuth ক্লায়েন্ট আইডি এবং গোপনীয়তা খুঁজে পেতে, নিম্নলিখিতগুলি করুন:
- শংসাপত্র পৃষ্ঠা খুলুন.
- নাম কলামে, আপনার OAuth ক্লায়েন্টের নামে ক্লিক করুন।
- ক্লায়েন্ট আইডি এবং গোপনীয়তা পৃষ্ঠায় তালিকাভুক্ত করা হয়েছে।
- একটি ওয়েব ব্রাউজার খুলুন এবং অনুসন্ধান বিজ্ঞাপন 360-এ ডেটা অ্যাক্সেস করার অনুমতি আছে এমন একটি Google অ্যাকাউন্ট দিয়ে Google-এ সাইন ইন করুন ।
এই Google অ্যাকাউন্টটি আপনার API ক্লায়েন্ট সার্চ বিজ্ঞাপন 360 এর সাথে প্রমাণীকরণের জন্য ব্যবহার করবে। যদি Google অ্যাকাউন্ট ধারক আপনার কোম্পানি ছেড়ে যান এবং আপনি অ্যাকাউন্ট থেকে Search Ads 360 অ্যাক্সেস সরিয়ে দেন, তাহলে আপনাকে এই অনুমোদনের কার্যপ্রবাহ পুনরাবৃত্তি করতে হবে এবং একটি ভিন্ন Google অ্যাকাউন্ট নির্দিষ্ট করতে হবে .
- নিম্নলিখিত হিসাবে অনুসন্ধান বিজ্ঞাপন 360 ইউটিলিটি স্ক্রিপ্ট আহ্বান করে একটি রিফ্রেশ টোকেন পান:
sa360Api.py --login
স্ক্রিপ্টটি আপনাকে একটি রিফ্রেশ টোকেন পেতে Oauth ক্লায়েন্ট আইডি এবং গোপন ব্যবহার করার প্রক্রিয়ার মধ্য দিয়ে নিয়ে যায়। রিফ্রেশ টোকেনটি শুধুমাত্র সেই Google অ্যাকাউন্টের জন্য বৈধ যা আপনি আগের ধাপে সাইন ইন করেছিলেন৷
এই প্রক্রিয়ার অংশ হিসাবে, স্ক্রিপ্ট একটি URL তৈরি করে এবং আপনাকে একটি ওয়েব ব্রাউজারে URL দেখার জন্য নির্দেশ দেয়।
যখন ব্রাউজার আপনাকে OAuth ক্লায়েন্টকে Search Ads 360 ডেটা অ্যাক্সেস করার অনুমতি দিতে বলে, তখন নিশ্চিত করুন যে আপনি আগে সাইন-ইন করেছেন সেই Google অ্যাকাউন্টটি দেখা যাচ্ছে। (যদি আপনি একাধিক Google অ্যাকাউন্টে সাইন ইন করে থাকেন, তাহলে আপনাকে একটি ভিন্ন অ্যাকাউন্ট দিয়ে উপস্থাপন করা হতে পারে।)

প্রক্রিয়া শেষে, sa360Api.py
স্ক্রিপ্ট একটি কমা-ডিলিমিটেড স্ট্রিং আউটপুট করে। প্রথম মান হল আপনার দেওয়া ক্লায়েন্ট আইডি, দ্বিতীয় মান হল আপনার দেওয়া ক্লায়েন্ট সিক্রেট, এবং তৃতীয় মান হল রিফ্রেশ টোকেন। নিম্নলিখিত উদাহরণের আউটপুটে, রিফ্রেশ টোকেনটি বোল্ড টেক্সটে রয়েছে:
123456789123.apps.googleusercontent.com,ABCDEFGHIJKLMNOPQR_abcdef, 1/HIJklM01OPQR23NOP456rst890uvw
- ক্লায়েন্ট আইডি, ক্লায়েন্ট সিক্রেট এবং রিফ্রেশ টোকেন একটি ব্যাকএন্ড ডাটাবেস বা আপনার অ্যাপ্লিকেশনে অ্যাক্সেসযোগ্য অন্য নিরাপদ স্থানে সংরক্ষণ করুন।
সার্চ বিজ্ঞাপন 360 এপিআই-এ নমুনা JSON অনুরোধ পাঠানোর জন্য আপনি sa360Api.py
ব্যবহার করার পরিকল্পনা করলে সম্পূর্ণ কমা-ডিলিমিটেড স্ট্রিংটিকে একটি সুবিধাজনক স্থানে রাখুন। আপনি প্রতিবার স্ক্রিপ্টটি চালু করার সময় একটি প্যারামিটার হিসাবে পুরো স্ট্রিংটি পাস করবেন।
- আপনার অ্যাপ্লিকেশনে কোড যোগ করুন যা নিম্নলিখিতগুলি করে:
- একটি নতুন OAuth 2.0 অ্যাক্সেস টোকেন পেতে ক্লায়েন্ট আইডি, ক্লায়েন্ট সিক্রেট এবং রিফ্রেশ টোকেন ব্যবহার করুন।
- নতুন অ্যাক্সেস টোকেন ব্যবহার করে Search Ads 360 API-এ অনুরোধ পাঠান।
আপনি যদি ক্লায়েন্ট লাইব্রেরিগুলি ব্যবহার করেন, তাহলে পরবর্তী বিভাগ, আপনার অ্যাপ্লিকেশন সেট আপ করুন , আপনার অ্যাপ্লিকেশনে এই অনুমোদন কোডটি কীভাবে যুক্ত করবেন তা বর্ণনা করে।
আপনি যদি ক্লায়েন্ট লাইব্রেরিগুলির একটি ব্যবহার না করেন, তাহলে একটি নতুন অ্যাক্সেস টোকেন পাওয়ার পরামর্শের জন্য ইনস্টল করা অ্যাপ্লিকেশনগুলির জন্য OAuth 2.0 ব্যবহার করা দেখুন৷
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2024-11-08 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2024-11-08 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003eThe Search Ads 360 API requires OAuth 2.0 access tokens for authentication, obtainable through standard OAuth 2.0 workflows or the recommended workflow outlined in the document.\u003c/p\u003e\n"],["\u003cp\u003eThe recommended workflow involves obtaining a refresh token using the provided utility script and storing it securely along with the client ID and secret.\u003c/p\u003e\n"],["\u003cp\u003eApplications should be designed to use the stored credentials to obtain fresh access tokens for API requests, as detailed in the "Set Up Your Application" section or relevant OAuth 2.0 documentation.\u003c/p\u003e\n"],["\u003cp\u003eAlternative workflows for installed or server-to-server applications are available with specific scope requirements and user management considerations.\u003c/p\u003e\n"]]],["The Search Ads 360 API requires OAuth 2.0 access tokens for authentication. The recommended workflow involves creating a Google API Console project and obtaining OAuth credentials. Users sign into a Google Account with Search Ads 360 access, then use the `sa360Api.py` script to generate a refresh token. The script outputs client ID, client secret, and refresh token. Store these securely, and use them in your application to obtain a fresh OAuth access token for API requests.\n"],null,["# Set Up Authorization\n\nThe Search Ads 360 API requires all requests to specify an [OAuth 2.0](/accounts/docs/OAuth2)\naccess token for authentication. You can follow any standard OAuth 2.0 authentication workflow\nto generate the token and pass it to the Search Ads 360 API. We recommend the workflow described\nbelow because it is suitable for fully automated conversion uploads and report downloads.\n\n\nFor alternatives to the workflow described below, see [Using\nOAuth 2.0 for Installed Applications](https://developers.google.com/accounts/docs/OAuth2InstalledApp) or\n[Using OAuth 2.0 for Server to Server Applications](https://developers.google.com/identity/protocols/OAuth2ServiceAccount). If you use an alternate workflow,\nspecify the following value as the `scope` parameter when you request an OAuth\n2.0 authorization code: \n\n`https://www.googleapis.com/auth/doubleclicksearch`\n\nIf you follow the server to server route, add the service account as a Search Ads 360 user.\n\nRecommended authorization workflow\n----------------------------------\n\n1. Go to the [Google API Console](https://console.cloud.google.com/) and select your project.\n\n\n If you haven't already created a Google API Console project and OAuth credentials, follow\n the instructions in [Create a Google API\n Console project and OAuth credentials for your client](/search-ads/v2/prereqs#project).\n\n To find your project's OAuth client ID and secret, do the following:\n 1. Open the [Credentials page](https://console.cloud.google.com/apis/credentials).\n 2. In the **Name** column, click the name of your OAuth client.\n 3. The client ID and secret are listed on the page.\n2. Open a web browser and [sign into Google](https://accounts.google.com/ServiceLogin)with a Google Account that [has\n permission to access data](/search-ads/v2/prereqs#permissions) in Search Ads 360.\n\n This is the Google Account your API client will use to authenticate with Search Ads 360.\n If the Google Account holder leaves your company and you remove Search Ads 360 access\n from the account, you will need to repeat this authorization workflow and specify a\n different Google Account.\n3. Obtain a refresh token by invoking the [Search Ads 360 utility script](/search-ads/v2/prereqs#ds3py) as follows:\n\n\n `sa360Api.py --login`\n\n\n The script takes you through the process of using the Oauth client ID and secret to\n obtain a refresh token. The refresh token is valid only for the Google Account you signed\n into during the previous step.\n\n As part of this process, the script generates a URL and instructs you to\n visit the URL in a web browser.\n4. When the browser asks you to allow OAuth client access to Search Ads 360 data,\n make sure the Google Account you signed into earlier appears. (If you're signed into multiple\n Google Accounts, you might be presented with a different account.)\n\n\n At the end of the process, the `sa360Api.py` script outputs a comma-delimited\n string. The first value is the client ID you provided, the second value is the client\n secret you provided, and the third value is the refresh token. In the following example\n output, the refresh token is in **bold text** : \n\n `123456789123.apps.googleusercontent.com,ABCDEFGHIJKLMNOPQR_abcdef,`**1/HIJklM01OPQR23NOP456rst890uvw**\n5. Store the client ID, client secret, and refresh token in a backend database or other secure location that's accessible to your application.\n Keep the entire comma-delimited string in a convenient location if you plan to use\n `sa360Api.py` to send sample JSON requests to the Search Ads 360 API. You'll pass the\n entire string as a parameter each time you invoke the script.\n\n6. Add code to your application that does the following:\n 1. Use the client ID, client secret, and refresh token to obtain a fresh OAuth 2.0 access token.\n 2. Send requests to the Search Ads 360 API using the fresh access token.\n\n\n If you're using the client libraries, the next section, [Set Up Your Application](/search-ads/v2/configure),\n describes how to add this authorization code to your application.\n\n\n If you're not using one of the client libraries, see [Using OAuth 2.0 for Installed Applications](https://developers.google.com/accounts/docs/OAuth2InstalledApp) for\n suggestions on obtaining a fresh access token."]]