> ## Documentation Index
> Fetch the complete documentation index at: https://generaltranslation.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# API कुंजी और सीक्रेट

export const Button = ({href, children}) => {
  return <div className="not-prose group">
    <a href={href}>
      <button className="flex items-center space-x-2.5 py-1 px-4 bg-primary-dark dark:bg-white text-white dark:text-gray-950 rounded-full group-hover:opacity-[0.9] font-medium">
        <span>
          {children}
        </span>
        <svg width="3" height="24" viewBox="0 -9 3 24" class="h-6 rotate-0 overflow-visible"><path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path></svg>
      </button>
    </a>
  </div>;
};

<div id="api-key-and-secret">
  ### API Key and Secret
</div>

X API तक पहुंचने के लिए API Key और Secret (जिन्हें Consumer Key और Secret भी कहा जाता है) सबसे बुनियादी क्रेडेंशियल हैं। ये क्रेडेंशियल आपके X App के लिए उपयोगकर्ता नाम और पासवर्ड की तरह काम करते हैं, और X API इन्हीं के आधार पर यह पहचानता है कि अनुरोध किस ऐप से आ रहे हैं। 

इन क्रेडेंशियल का उपयोग [प्रमाणीकरण एंडपॉइंट्स](/hi/resources/fundamentals/authentication/api-reference) के जरिए अतिरिक्त क्रेडेंशियल जनरेट करने के लिए किया जा सकता है, जैसे [उपयोगकर्ता Access Tokens और Secrets](/hi/resources/fundamentals/authentication/oauth-1-0a/api-key-and-secret) और [बेयरर टोकन](/hi/resources/fundamentals/authentication/oauth-2-0/bearer-tokens)। जिन अनुरोधों के लिए OAuth 1.0a User Context प्रमाणीकरण आवश्यक होता है, उन्हें [अधिकृत करने](/hi/resources/fundamentals/authentication/oauth-1-0a/authorizing-a-request) के लिए आपको इन क्रेडेंशियल का उपयोग Access Tokens और अन्य प्राधिकरण पैरामीटर के साथ भी करना होगा। 

<div id="how-to-acquire-an-api-key-and-secret">
  #### API Key और Secret कैसे प्राप्त करें
</div>

X API Key और Secret प्राप्त करने के लिए, कृपया ये चरण अपनाएँ:

1. [X डेवलपर खाते के लिए साइन अप करें](https://developer.x.com/en/apply-for-access)
2. [डेवलपर कंसोल](/hi/resources/fundamentals/developer-portal) में एक [X App](/hi/resources/fundamentals/developer-apps) बनाएँ। ध्यान दें कि अगर आप [X API v2](/hi/x-api/introduction) का इस्तेमाल करना चाहते हैं, तो आपको डेवलपर App की keys और tokens का उपयोग करना होगा।
    

जब आप अपना X App बनाते हैं, तो आपको API Key और Secret के साथ एक बेयरर टोकन भी दिखाया जाएगा। कृपया ध्यान दें कि हम ये credentials केवल एक बार दिखाते हैं, इसलिए इन्हें अपने password manager या किसी अन्य सुरक्षित स्थान पर ज़रूर सहेज लें।

हमारे [authentication best practices](/hi/resources/fundamentals/authentication/guides/authentication-best-practices) पेज पर आपकी keys और tokens को सुरक्षित तरीके से संभालने के लिए और भी सिफारिशें दी गई हैं। इसमें यह भी बताया गया है कि अगर आपके credentials से समझौता हो जाए, तो आपको क्या करना चाहिए।
 

<div id="how-to-find-and-regenerate-your-api-key-and-secret-after-app-creation">
  #### ऐप बनाने के बाद अपनी API Key और Secret कैसे ढूँढें और फिर से जनरेट करें
</div>

अगर आपने पहले ही एक ऐप बना लिया है और अपनी API Key और Secret को ढूँढना या फिर से जनरेट करना चाहते हैं, तो कृपया ये चरण अपनाएँ:

1. डेवलपर कंसोल पर जाएँ
2. साइड नेव में 'Apps' ड्रॉपडाउन खोलें
3. वह ऐप खोलें, जिससे वह API Key और Secret जुड़ा है जिसे आप ढूँढना या फिर से जनरेट करना चाहते हैं
4. Keys and tokens टैब पर जाएँ

वहाँ आपको अपने ऐप से जुड़े सभी क्रेडेंशियल मिल जाएँगे। 
 

<div id="how-to-use-your-api-key-and-secret">
  #### अपनी API Key और Secret का इस्तेमाल कैसे करें
</div>

अगर आप अभी सिर्फ़ X Developer Platform को एक्सप्लोर कर रहे हैं, तो हम सुझाव देते हैं कि प्लैटफ़ॉर्म पर क्या-क्या उपलब्ध है, यह देखने के लिए आप किसी [टूल या लाइब्रेरी](/hi/resources/tools-and-libraries) का इस्तेमाल करें। ये टूल प्रमाणीकरण को आसानी से संभाल लेते हैं और आपका काफ़ी समय व मेहनत बचा सकते हैं। शुरुआती डेवलपरों के लिए हम खास तौर पर [Postman के साथ शुरुआत करने](/hi/tutorials/postman-getting-started) या [Insomnia](https://insomnia.rest/) का सुझाव देते हैं। 

अगर आप शुरू से खुद एक अनुरोध बनाना चाहते हैं, तो कृपया [OAuth 1.0a अनुरोध को प्राधिकृत करने](/hi/resources/fundamentals/authentication/oauth-1-0a/authorizing-a-request) पर हमारी गाइड पढ़ें।
 
