हम Data API को अपडेट कर रहे हैं, ताकि यह Shorts पर मिले व्यू की गिनती करने के तरीके से मेल खा सके.
ज़्यादा जानें
अनुमति देने के लिए क्रेडेंशियल पाना
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
YouTube Data API का इस्तेमाल करने के लिए, आपके ऐप्लिकेशन में अनुमति देने वाले क्रेडेंशियल होने चाहिए.
इस दस्तावेज़ में, अनुमति देने वाले उन अलग-अलग तरह के क्रेडेंशियल के बारे में बताया गया है जो Google API कंसोल पर काम करते हैं. इसमें यह भी बताया गया है कि अपने प्रोजेक्ट के लिए, अनुमति देने वाले क्रेडेंशियल कैसे ढूंढें या बनाएं.
अपना प्रोजेक्ट बनाएं और एपीआई सेवाएं चुनें
- एपीआई कंसोल में क्रेडेंशियल पेज खोलें.
-
यह एपीआई दो तरह के क्रेडेंशियल के साथ काम करता है.
अपने प्रोजेक्ट के लिए सही क्रेडेंशियल बनाएं:
-
OAuth 2.0: जब भी आपका ऐप्लिकेशन, उपयोगकर्ता के निजी डेटा का अनुरोध करता है, तो उसे अनुरोध के साथ OAuth 2.0 टोकन भेजना चाहिए. आपका
ऐप्लिकेशन सबसे पहले एक क्लाइंट आईडी भेजता है. इसके बाद, टोकन पाने के लिए क्लाइंट सीक्रेट भेजा जा सकता है. वेब ऐप्लिकेशन, सेवा खातों या इंस्टॉल किए गए ऐप्लिकेशन के लिए, OAuth 2.0 क्रेडेंशियल जनरेट किए जा सकते हैं.
ज़्यादा जानकारी के लिए, OAuth 2.0 दस्तावेज़ देखें.
-
एपीआई पासकोड:
OAuth 2.0 टोकन न देने वाले अनुरोध के लिए, एपीआई
कुंजी भेजना ज़रूरी है.
कुंजी आपके प्रोजेक्ट की पहचान करती है. साथ ही, एपीआई ऐक्सेस, कोटा, और
रिपोर्ट उपलब्ध कराती है.
इस एपीआई में, एपीआई कुंजियों पर कई तरह की पाबंदियां काम करती हैं. अगर वह एपीआई पासकोड पहले से मौजूद नहीं है
जिसकी आपको ज़रूरत है, तो कंसोल में जाकर
क्रेडेंशियल बनाएं
> एपीआई पासकोड पर क्लिक करके एक एपीआई पासकोड बनाएं. प्रोडक्शन में इस्तेमाल करने से पहले, कुंजी पर पाबंदी लगाई जा सकती है. इसके लिए, कुंजी पर पाबंदी लगाएं पर क्लिक करें और पाबंदियां में से किसी एक को चुनें.
अपनी एपीआई कुंजियों को सुरक्षित रखने के लिए, एपीआई पासकोड को सुरक्षित तरीके से इस्तेमाल करने के सबसे सही तरीके अपनाएं.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2024-03-06 (UTC) को अपडेट किया गया.
[[["समझने में आसान है","easyToUnderstand","thumb-up"],["मेरी समस्या हल हो गई","solvedMyProblem","thumb-up"],["अन्य","otherUp","thumb-up"]],[["वह जानकारी मौजूद नहीं है जो मुझे चाहिए","missingTheInformationINeed","thumb-down"],["बहुत मुश्किल है / बहुत सारे चरण हैं","tooComplicatedTooManySteps","thumb-down"],["पुराना","outOfDate","thumb-down"],["अनुवाद से जुड़ी समस्या","translationIssue","thumb-down"],["सैंपल / कोड से जुड़ी समस्या","samplesCodeIssue","thumb-down"],["अन्य","otherDown","thumb-down"]],["आखिरी बार 2024-03-06 (UTC) को अपडेट किया गया."],[[["\u003cp\u003eApplications using the YouTube Data API require authorization credentials for access.\u003c/p\u003e\n"],["\u003cp\u003eThe Google API Console supports two types of credentials: OAuth 2.0 tokens for private user data and API keys for general API access.\u003c/p\u003e\n"],["\u003cp\u003eOAuth 2.0 credentials can be generated for web applications, service accounts, or installed applications.\u003c/p\u003e\n"],["\u003cp\u003eAPI keys identify your project and provide API access, quota management, and usage reports, and can be restricted in scope.\u003c/p\u003e\n"],["\u003cp\u003eYou must create the credential, either the API key or OAuth 2.0, that will fit the needs of the project.\u003c/p\u003e\n"]]],["To use the YouTube Data API, your application needs authorization credentials. You can acquire these via the Google API Console. Two types are available: OAuth 2.0 tokens for private user data, obtained using a client ID and potentially a secret, and API keys for general access, project identification, quota, and reporting. Create credentials by navigating to the console's Credentials page. API keys can be further restricted. Always refer to best practices for securely using API keys.\n"],null,["# Obtaining authorization credentials\n\nYour application must have authorization credentials to be able to use the YouTube Data API.\n\nThis document describes the different types of authorization credentials that the [Google API Console](https://console.cloud.google.com/) supports. It also explains how to find or create authorization credentials for your project.\n\nCreate your project and select API services\n-------------------------------------------\n\n1. Open the [Credentials page](https://console.cloud.google.com/apis/credentials) in the API Console.\n2. This API supports two types of credentials. Create whichever credentials are appropriate for your project:\n - **OAuth 2.0:** Whenever your application requests private user\n data, it must send an OAuth 2.0 token along with the request. Your\n application first sends a client ID and, possibly, a client secret to\n obtain a token. You can generate OAuth 2.0 credentials for web\n applications, service accounts, or installed applications.\n\n For more information, see the [OAuth 2.0 documentation](https://developers.google.com/identity/protocols/OAuth2).\n - **API keys:**\n\n A request that does not provide an OAuth 2.0 token must send an API\n key.\n\n The key identifies your project and provides API access, quota, and\n reports.\n\n The API supports several types of restrictions on API keys. If the API key that you\n need doesn't already exist, then create an API key in the Console by\n clicking **[Create credentials](https://console.cloud.google.com/apis/credentials) \\\u003e API key** . You can restrict the key before using it\n in production by clicking **Restrict key** and selecting one of the\n **Restrictions**.\n\nTo keep your API keys secure, follow the [best practices for\nsecurely using API keys](//cloud.google.com/docs/authentication/api-keys)."]]