> ## 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.

# डायरेक्ट मैसेज लुकअप

> डायरेक्ट मैसेज इवेंट और बातचीत प्राप्त करें

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>;
};

Direct Messages lookup एंडपॉइंट्स आपको प्रमाणीकृत उपयोगकर्ता के लिए DM इवेंट्स प्राप्त करने देते हैं, जिनमें एक-से-एक और समूह, दोनों तरह की बातचीतों के संदेश शामिल होते हैं।

<div id="overview">
  ## अवलोकन
</div>

<CardGroup cols={2}>
  <Card title="सभी DM इवेंट" icon="messages">
    उपयोगकर्ता के सभी DM इवेंट प्राप्त करें
  </Card>

  <Card title="एक-से-एक" icon="message">
    किसी विशिष्ट बातचीत के इवेंट प्राप्त करें
  </Card>

  <Card title="बातचीत ID के आधार पर" icon="comments">
    बातचीत ID के आधार पर इवेंट प्राप्त करें
  </Card>

  <Card title="इवेंट के प्रकार" icon="bell">
    संदेश, शामिल होना और छोड़ना
  </Card>
</CardGroup>

***

<div id="endpoints">
  ## एंडपॉइंट्स
</div>

| Method | Endpoint                                                                                                               | Description                             |
| :----- | :--------------------------------------------------------------------------------------------------------------------- | :-------------------------------------- |
| GET    | [`/2/dm_events`](/hi/x-api/direct-messages/get-dm-events)                                                              | उपयोगकर्ता के सभी DM इवेंट प्राप्त करें |
| GET    | [`/2/dm_conversations/with/:participant_id/dm_events`](/hi/x-api/direct-messages/get-dm-events-for-a-dm-conversation)  | एक-से-एक बातचीत के इवेंट प्राप्त करें   |
| GET    | [`/2/dm_conversations/:dm_conversation_id/dm_events`](/hi/x-api/direct-messages/get-dm-events-for-a-dm-conversation-1) | बातचीत ID से इवेंट प्राप्त करें         |

***

<div id="event-types">
  ## इवेंट के प्रकार
</div>

| इवेंट               | विवरण                               |
| :------------------ | :---------------------------------- |
| `MessageCreate`     | बातचीत में एक संदेश भेजा गया        |
| `ParticipantsJoin`  | एक उपयोगकर्ता बातचीत में शामिल हुआ  |
| `ParticipantsLeave` | एक उपयोगकर्ता बातचीत छोड़कर चला गया |

***

<div id="data-retention">
  ## डेटा प्रतिधारण
</div>

<Note>
  इन एंडपॉइंट्स के माध्यम से **पिछले 30 दिनों** तक के इवेंट उपलब्ध हैं।
</Note>

***

<div id="getting-started">
  ## शुरुआत करें
</div>

<Note>
  **पूर्वापेक्षाएँ**

  * एक स्वीकृत [डेवलपर खाता](https://developer.x.com/en/portal/petition/essential/basic-info)
  * डेवलपर कंसोल में एक [Project और ऐप](/hi/resources/fundamentals/developer-apps)
  * [3-legged OAuth](/hi/resources/fundamentals/authentication#obtaining-access-tokens-using-3-legged-oauth-flow) के ज़रिए User Access Tokens
</Note>

<CardGroup cols={2}>
  <Card title="त्वरित शुरुआत" icon="rocket" href="/hi/x-api/direct-messages/lookup/quickstart">
    अपना पहला DM लुकअप अनुरोध भेजें
  </Card>

  <Card title="एकीकरण गाइड" icon="book" href="/hi/x-api/direct-messages/lookup/integrate">
    मुख्य अवधारणाएँ और सर्वोत्तम अभ्यास
  </Card>

  <Card title="API संदर्भ" icon="code" href="/hi/x-api/direct-messages/get-dm-events">
    एंडपॉइंट का पूरा दस्तावेज़ीकरण
  </Card>

  <Card title="नमूना कोड" icon="github" href="https://github.com/xdevplatform/Twitter-API-v2-sample-code">
    कार्यशील कोड उदाहरण
  </Card>
</CardGroup>
