API সেট আপ করুন
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
পোস্টমাস্টার টুলস এপিআই-এ আপনার আবেদন পাঠানো প্রতিটি অনুরোধে অবশ্যই একটি অনুমোদন টোকেন অন্তর্ভুক্ত করতে হবে। টোকেনটি Google-এ আপনার আবেদনকেও শনাক্ত করে।
অনুমোদন প্রোটোকল সম্পর্কে
অনুরোধ অনুমোদন করতে আপনার অ্যাপ্লিকেশন অবশ্যই OAuth 2.0 ব্যবহার করবে। অন্য কোন অনুমোদন প্রোটোকল সমর্থিত হয় না. যদি আপনার অ্যাপ্লিকেশন Google এর সাথে সাইন ইন ব্যবহার করে, তবে অনুমোদনের কিছু দিক আপনার জন্য পরিচালনা করা হয়।
OAuth 2.0 এর মাধ্যমে অনুরোধ অনুমোদন করা হচ্ছে
পোস্টমাস্টার টুলস এপিআই-এর সমস্ত অনুরোধ একটি প্রমাণীকৃত ব্যবহারকারী দ্বারা অনুমোদিত হতে হবে।
OAuth 2.0-এর জন্য অনুমোদন প্রক্রিয়ার বিশদ বিবরণ বা "প্রবাহ" আপনি কোন ধরনের অ্যাপ্লিকেশন লিখছেন তার উপর নির্ভর করে কিছুটা পরিবর্তিত হয়। নিম্নলিখিত সাধারণ প্রক্রিয়া সব ধরনের আবেদনের ক্ষেত্রে প্রযোজ্য:
- আপনি যখন আপনার অ্যাপ্লিকেশন তৈরি করেন, আপনি Google API কনসোল ব্যবহার করে এটি নিবন্ধন করেন। Google তারপরে আপনার প্রয়োজন হবে এমন তথ্য প্রদান করে, যেমন একটি ক্লায়েন্ট আইডি এবং একটি ক্লায়েন্ট গোপন।
- Google API কনসোলে পোস্টমাস্টার টুল API সক্রিয় করুন। (যদি API কনসোলে এপিআই তালিকাভুক্ত না থাকে, তাহলে এই ধাপটি এড়িয়ে যান।)
- যখন আপনার অ্যাপ্লিকেশনটির ব্যবহারকারীর ডেটাতে অ্যাক্সেসের প্রয়োজন হয়, তখন এটি Google কে অ্যাক্সেসের একটি নির্দিষ্ট সুযোগের জন্য জিজ্ঞাসা করে।
- Google ব্যবহারকারীর কাছে একটি সম্মতি স্ক্রীন প্রদর্শন করে, তাদের কিছু ডেটা অনুরোধ করার জন্য আপনার আবেদনকে অনুমোদন করতে বলে।
- যদি ব্যবহারকারী অনুমোদন করেন, তাহলে Google আপনার অ্যাপ্লিকেশনকে একটি স্বল্পকালীন অ্যাক্সেস টোকেন দেয়।
- আপনার অ্যাপ্লিকেশন ব্যবহারকারীর ডেটা অনুরোধ করে, অনুরোধে অ্যাক্সেস টোকেন সংযুক্ত করে।
- যদি Google নির্ধারণ করে যে আপনার অনুরোধ এবং টোকেন বৈধ, এটি অনুরোধ করা ডেটা ফেরত দেয়।
কিছু প্রবাহে অতিরিক্ত পদক্ষেপ অন্তর্ভুক্ত থাকে, যেমন নতুন অ্যাক্সেস টোকেন অর্জন করতে রিফ্রেশ টোকেন ব্যবহার করে। বিভিন্ন ধরনের অ্যাপ্লিকেশনের জন্য প্রবাহ সম্পর্কে বিস্তারিত তথ্যের জন্য, Google এর OAuth 2.0 ডকুমেন্টেশন দেখুন।
পোস্টমাস্টার টুলস API-এর জন্য এখানে OAuth 2.0 স্কোপের তথ্য রয়েছে:
ব্যাপ্তি | অর্থ |
---|
https://www.googleapis.com/auth/postmaster.readonly | পোস্টমাস্টার টুলস ডেটাতে শুধুমাত্র-পঠন অ্যাক্সেসের অনুমতি দেয়। |
OAuth 2.0 ব্যবহার করে অ্যাক্সেসের অনুরোধ করার জন্য, আপনার অ্যাপ্লিকেশনের সুযোগ তথ্যের প্রয়োজন, সেইসাথে আপনি যখন আপনার আবেদনটি নিবন্ধন করেন তখন Google সরবরাহ করে এমন তথ্য (যেমন ক্লায়েন্ট আইডি এবং ক্লায়েন্ট সিক্রেট)।
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-08-29 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-08-29 UTC-তে শেষবার আপডেট করা হয়েছে।"],[],[],null,["# Set up the API\n\nEvery request your application sends to the Postmaster Tools API must include an authorization token. The token also identifies your application to Google.\n\nAbout authorization protocols\n-----------------------------\n\nYour application must use [OAuth 2.0](https://developers.google.com/identity/protocols/OAuth2) to authorize requests. No other authorization protocols are supported. If your application uses [Sign In With Google](https://developers.google.com/identity/gsi/web), some aspects of authorization are handled for you.\n\nAuthorizing requests with OAuth 2.0\n-----------------------------------\n\nAll requests to the Postmaster Tools API must be authorized by an authenticated user.\n\nThe details of the authorization process, or \"flow,\" for OAuth 2.0 vary somewhat depending on what kind of application you're writing. The following general process applies to all application types:\n\n1. When you create your application, you register it using the [Google API Console](https://console.cloud.google.com/). Google then provides information you'll need later, such as a client ID and a client secret.\n2. Activate the Postmaster Tools API in the Google API Console. (If the API isn't listed in the API Console, then skip this step.)\n3. When your application needs access to user data, it asks Google for a particular **scope** of access.\n4. Google displays a **consent screen** to the user, asking them to authorize your application to request some of their data.\n5. If the user approves, then Google gives your application a short-lived **access token**.\n6. Your application requests user data, attaching the access token to the request.\n7. If Google determines that your request and the token are valid, it returns the requested data.\n\nSome flows include additional steps, such as using **refresh tokens** to acquire new access tokens. For detailed information about flows for various types of applications, see Google's [OAuth 2.0 documentation](https://developers.google.com/identity/protocols/OAuth2).\n\nHere's the OAuth 2.0 scope information for the Postmaster Tools API:\n\n| Scope | Meaning |\n|-------------------------------------------------------|---------------------------------------------------|\n| `https://www.googleapis.com/auth/postmaster.readonly` | Allows read-only access to Postmaster Tools data. |\n\nTo request access using OAuth 2.0, your application needs the scope information, as well as\ninformation that Google supplies when you register your application (such as the client ID and the\nclient secret)."]]