OAuth 2.0 প্রমাণীকরণ বাস্তবায়ন করা হচ্ছে
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
YouTube Live Streaming API ব্যক্তিগত ব্যবহারকারীর ডেটা অ্যাক্সেস অনুমোদনের জন্য OAuth 2.0 প্রোটোকল সমর্থন করে। নিম্নলিখিত তালিকা কিছু মূল OAuth 2.0 ধারণা ব্যাখ্যা করে:
যখন একজন ব্যবহারকারী প্রথমে আপনার অ্যাপ্লিকেশনে এমন বৈশিষ্ট্যগুলি ব্যবহার করার চেষ্টা করে যার জন্য ব্যবহারকারীকে একটি Google Account or YouTube account লগ ইন করতে হবে, তখন আপনার অ্যাপ্লিকেশনটি OAuth 2.0 অনুমোদন প্রক্রিয়া শুরু করে৷
আপনার অ্যাপ্লিকেশন ব্যবহারকারীকে Google এর অনুমোদন সার্ভারে নির্দেশ করে৷ সেই পৃষ্ঠার লিঙ্কটি অ্যাক্সেসের scope
নির্দিষ্ট করে যা আপনার অ্যাপ্লিকেশন ব্যবহারকারীর অ্যাকাউন্টের জন্য অনুরোধ করছে। scope
সেই সংস্থানগুলি নির্দিষ্ট করে যা আপনার অ্যাপ্লিকেশন প্রমাণীকৃত ব্যবহারকারী হিসাবে কাজ করার সময় পুনরুদ্ধার, সন্নিবেশ, আপডেট বা মুছে ফেলতে পারে।
ব্যবহারকারী যদি সেই সংস্থানগুলি অ্যাক্সেস করার জন্য আপনার অ্যাপ্লিকেশনটিকে অনুমোদন করতে সম্মতি দেয়, Google আপনার অ্যাপ্লিকেশনে একটি টোকেন ফেরত দেয়। আপনার অ্যাপ্লিকেশানের প্রকারের উপর নির্ভর করে, এটি হয় টোকেনটিকে বৈধ করে বা এটিকে একটি ভিন্ন ধরণের টোকেনের জন্য বিনিময় করে৷
উদাহরণস্বরূপ, একটি সার্ভার-সাইড ওয়েব অ্যাপ্লিকেশন একটি অ্যাক্সেস টোকেন এবং একটি রিফ্রেশ টোকেনের জন্য ফেরত টোকেন বিনিময় করে। অ্যাক্সেস টোকেন অ্যাপ্লিকেশনটিকে ব্যবহারকারীর পক্ষ থেকে অনুরোধগুলি অনুমোদন করতে দেয় এবং রিফ্রেশ টোকেনটি অ্যাপ্লিকেশনটিকে একটি নতুন অ্যাক্সেস টোকেন পুনরুদ্ধার করতে দেয় যখন আসল অ্যাক্সেস টোকেনের মেয়াদ শেষ হয়ে যায়।
গুরুত্বপূর্ণ: OAuth 2.0 অনুমোদন ব্যবহার করতে, আপনাকে Google API কনসোলে অনুমোদনের শংসাপত্রগুলি পেতে হবে।
আরো বিস্তারিত জানার জন্য, OAuth 2.0 অনুমোদন নির্দেশিকা দেখুন।
দ্রষ্টব্য: একটি চ্যানেলকে YouTube লাইভ বৈশিষ্ট্য ব্যবহার করার জন্য অনুমোদিত হতে হবে, যা চ্যানেল মালিককে সেই চ্যানেলে লাইভ সামগ্রী স্ট্রিম করতে সক্ষম করে। আপনি যদি এমন একজন প্রমাণীকৃত ব্যবহারকারীর পক্ষ থেকে API অনুরোধ পাঠান যার চ্যানেল সক্রিয় নয় বা লাইভ সামগ্রী স্ট্রিম করার যোগ্য নয়, তাহলে API একটি insufficientPermissions
ত্রুটি ফিরিয়ে দেবে।
OAuth 2.0 প্রবাহ
Google APIগুলি বেশ কয়েকটি OAuth 2.0 ব্যবহারের ক্ষেত্রে সমর্থন করে:
- সার্ভার-সাইড ওয়েব অ্যাপ্লিকেশান ফ্লো ওয়েব অ্যাপ্লিকেশনগুলিকে সমর্থন করে যা নিরাপদে স্থায়ী তথ্য সংরক্ষণ করতে পারে৷
- JavaScript ওয়েব অ্যাপস ফ্লো একটি ব্রাউজারে চলমান জাভাস্ক্রিপ্ট অ্যাপ্লিকেশন সমর্থন করে।
- মোবাইল এবং ডেস্কটপ অ্যাপ্লিকেশানগুলি একটি ডিভাইসে ইনস্টল করা অ্যাপ্লিকেশনগুলিকে সমর্থন করে, যেমন একটি ফোন বা কম্পিউটার৷
- টিভি এবং সীমিত-ইনপুট ডিভাইস ফ্লো সীমিত ইনপুট ক্ষমতা সহ ডিভাইসগুলিকে সমর্থন করে, যেমন গেম কনসোল এবং ভিডিও ক্যামেরা।
- পরিষেবা অ্যাকাউন্ট প্রবাহের জন্য OAuth 2.0 ফ্লো সার্ভার-টু-সার্ভার ইন্টারঅ্যাকশন সমর্থন করে যা ব্যবহারকারীর তথ্য অ্যাক্সেস করে না। যাইহোক, YouTube Live Streaming API এই প্রবাহ সমর্থন করে না। Since there is no way to link a Service Account to a YouTube account, attempts to authorize requests with this flow will generate a
NoLinkedYouTubeAccount
error.
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2024-11-17 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2024-11-17 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003eThe YouTube Live Streaming API uses OAuth 2.0 for authorizing access to private user data, requiring an application to initiate the authorization process when a user attempts to use features needing a Google or YouTube account.\u003c/p\u003e\n"],["\u003cp\u003eDuring OAuth 2.0 authorization, the application directs the user to Google's authorization server, where the requested access scope is defined, specifying which resources the application can interact with.\u003c/p\u003e\n"],["\u003cp\u003eUpon user consent, Google returns a token to the application, which may be exchanged for an access token and a refresh token, enabling the application to make authorized requests and renew authorization when needed.\u003c/p\u003e\n"],["\u003cp\u003eTo utilize OAuth 2.0 Authorization, you must obtain authorization credentials from the Google API Console.\u003c/p\u003e\n"],["\u003cp\u003eThe YouTube Live Streaming API supports several OAuth 2.0 flows, but does not support the Service Account flow.\u003c/p\u003e\n"]]],["The YouTube Live Streaming API utilizes OAuth 2.0 for authorizing access to user data. Applications initiate authorization, redirecting users to Google's server to define access scope. Upon user consent, Google issues a token; web apps exchange this for access and refresh tokens. Developers must obtain authorization credentials from the Google API Console. Different flows support various application types, but the service account flow is not compatible with the YouTube Live Streaming API. Channels must also be approved to enable live streaming.\n"],null,["# Implementing OAuth 2.0 Authentication\n\nThe YouTube Live Streaming API supports the [OAuth 2.0 protocol](http://oauth.net/2/) for authorizing access to private user data.\n\nThe following list explains some core OAuth 2.0 concepts:\n\n- When a user first attempts to use features in your application that requires the user to be logged in to a Google Account or YouTube account, your application initiates the OAuth 2.0 authorization process.\n\n- Your application directs the user to Google's authorization server. The link to that page specifies the **scope** of access that your application is requesting for the user's account. The **scope** specifies the resources that your application can retrieve, insert, update, or delete when acting as the authenticated user.\n\n- If the user consents to authorize your application to access those resources, Google returns a token to your application. Depending on your application's type, it either validates the token or exchanges it for a different type of token.\n\n For example, a server-side web application exchanges the returned token for an access token and a refresh token. The access token lets the application authorize requests on the user's behalf, and the refresh token lets the application retrieve a new access token when the original access token expires.\n\n**Important:** To use the OAuth 2.0 Authorization, you need to [obtain authorization credentials in the Google API Console](/youtube/v3/live/registering_an_application).\n\nFor more details, see the [OAuth 2.0 Authorization Guide](https://developers.google.com/identity/protocols/oauth2).\n\n**Note:** A channel must be approved to use the YouTube Live\nfeature, which enables the channel owner to stream live content to that channel. If you send API\nrequests on behalf of an authenticated user whose channel is not enabled or eligible to stream\nlive content, the API will return an `insufficientPermissions` error.\n\nOAuth 2.0 flows\n---------------\n\nGoogle APIs support several OAuth 2.0 use cases:\n\n- The [server-side web apps](/youtube/v3/live/guides/auth/server-side-web-apps) flow supports web applications that can securely store persistent information.\n- The [JavaScript web apps](/youtube/v3/live/guides/auth/client-side-web-apps) flow supports JavaScript applications running in a browser.\n- The [mobile and desktop apps](/youtube/v3/live/guides/auth/installed-apps) flow supports applications installed on a device, such as a phone or computer.\n- The [TVs and limited-input devices](/youtube/v3/live/guides/auth/devices) flow supports devices with limited input capabilities, such as game consoles and video cameras.\n- The OAuth 2.0 flow for service account flow supports server-to-server interactions that do not access user information. However, the YouTube Live Streaming API does not support this flow. Since there is no way to link a Service Account to a YouTube account, attempts to authorize requests with this flow will generate a `NoLinkedYouTubeAccount` error."]]