यह मॉड्यूल X API के डायरेक्ट मैसेज एंडपॉइंट्स तक पहुँच प्रदान करता है
और डायरेक्ट मैसेज से जुड़ी सभी कार्यक्षमताओं के लिए मुख्य प्रवेश-बिंदु के रूप में काम करता है।
class xdk.direct_messages.DirectMessagesClient
डायरेक्ट मैसेज संचालन के लिए Client
पैरामीटर
Client
__init__
पैरामीटर
Client
create_by_conversation_id
वार्तालाप ID द्वारा DM संदेश बनाएँ
किसी विशिष्ट वार्तालाप की ID के आधार पर उसे नया डायरेक्ट मैसेज भेजता है।
पैरामीटर
str
DM वार्तालाप की ID।
CreateByConversationIdRequest
अनुरोध बॉडी
create_by_participant_id
प्रतिभागी ID के आधार पर DM संदेश बनाएँ
किसी विशिष्ट प्रतिभागी को उसकी ID का उपयोग करके नया डायरेक्ट मैसेज भेजता है।
पैरामीटर
Any
उस प्राप्तकर्ता उपयोगकर्ता की ID, जिसे DM प्राप्त होगा।
CreateByParticipantIdRequest
अनुरोध बॉडी
create_conversation
DM वार्तालाप बनाएँ
निर्दिष्ट प्रतिभागियों के साथ एक नया डायरेक्ट मैसेज वार्तालाप शुरू करता है।
body: अनुरोध बॉडी
:returns: प्रतिक्रिया डेटा
:rtype: CreateConversationResponse
पैरामीटर
CreateConversationRequest
delete_events
DM इवेंट हटाएँ
यदि वह प्रमाणीकृत उपयोगकर्ता के स्वामित्व में है, तो उसकी id के आधार पर किसी विशिष्ट डायरेक्ट मैसेज इवेंट को हटाता है।
पैरामीटर
Any
हटाए जाने वाले डायरेक्ट मैसेज इवेंट की आईडी।
रिटर्न
DeleteEventsResponse - प्रतिक्रिया डेटा
get_events
DM इवेंट्स प्राप्त करें
सभी वार्तालापों में हाल के डायरेक्ट मैसेज इवेंट्स की एक सूची प्राप्त करता है।
पैरामीटर
int or None
डिफ़ॉल्ट:"None"
परिणामों की अधिकतम संख्या।
Any or None
डिफ़ॉल्ट:"None"
इस पैरामीटर का उपयोग परिणामों का एक निर्दिष्ट ‘पेज’ प्राप्त करने के लिए किया जाता है।
List or None
डिफ़ॉल्ट:"None"
परिणामों में शामिल किए जाने वाले event_types का सेट।
List or None
डिफ़ॉल्ट:"None"
प्रदर्शित किए जाने वाले DmEvent फ़ील्ड्स की कॉमा से अलग की गई सूची।
List or None
डिफ़ॉल्ट:"None"
विस्तार के लिए फ़ील्ड्स की कॉमा से अलग की गई सूची।
List or None
डिफ़ॉल्ट:"None"
प्रदर्शित किए जाने वाले Media फ़ील्ड्स की कॉमा से अलग की गई सूची।
List or None
डिफ़ॉल्ट:"None"
प्रदर्शित किए जाने वाले User फ़ील्ड्स की कॉमा से अलग की गई सूची।
List or None
डिफ़ॉल्ट:"None"
प्रदर्शित किए जाने वाले Tweet फ़ील्ड्स की कॉमा से अलग की गई सूची।
रिटर्न
IteratorGetEventsResponse
get_events_by_conversation_id
किसी DM वार्तालाप के लिए DM इवेंट्स प्राप्त करें
किसी विशिष्ट वार्तालाप के लिए डायरेक्ट मैसेज इवेंट्स प्राप्त करता है।
पैरामीटर
Any
DM वार्तालाप की ID।
int or None
डिफ़ॉल्ट:"None"
परिणामों की अधिकतम संख्या।
Any or None
डिफ़ॉल्ट:"None"
इस पैरामीटर का उपयोग परिणामों का एक निर्दिष्ट ‘पेज’ प्राप्त करने के लिए किया जाता है।
List or None
डिफ़ॉल्ट:"None"
परिणामों में शामिल किए जाने वाले event_types का सेट।
List or None
डिफ़ॉल्ट:"None"
प्रदर्शित किए जाने वाले DmEvent फ़ील्ड्स की अल्पविराम-से-अलग की गई सूची।
List or None
डिफ़ॉल्ट:"None"
विस्तारित किए जाने वाले फ़ील्ड्स की अल्पविराम-से-अलग की गई सूची।
List or None
डिफ़ॉल्ट:"None"
प्रदर्शित किए जाने वाले Media फ़ील्ड्स की अल्पविराम-से-अलग की गई सूची।
List or None
डिफ़ॉल्ट:"None"
प्रदर्शित किए जाने वाले User फ़ील्ड्स की अल्पविराम-से-अलग की गई सूची।
List or None
डिफ़ॉल्ट:"None"
प्रदर्शित किए जाने वाले Tweet फ़ील्ड्स की अल्पविराम-से-अलग की गई सूची।
रिटर्न
IteratorGetEventsByConversationIdResponse
get_events_by_id
ID से DM इवेंट प्राप्त करें
किसी विशिष्ट डायरेक्ट मैसेज इवेंट का विवरण उसकी ID के आधार पर प्राप्त करता है।
पैरामीटर
Any
dm इवेंट id.
List or None
डिफ़ॉल्ट:"None"
प्रदर्शित करने के लिए DmEvent फ़ील्ड्स की कॉमा-सेपरेटेड सूची।
List or None
डिफ़ॉल्ट:"None"
विस्तारित करने के लिए फ़ील्ड्स की कॉमा-सेपरेटेड सूची।
List or None
डिफ़ॉल्ट:"None"
प्रदर्शित करने के लिए Media फ़ील्ड्स की कॉमा-सेपरेटेड सूची।
List or None
डिफ़ॉल्ट:"None"
प्रदर्शित करने के लिए User फ़ील्ड्स की कॉमा-सेपरेटेड सूची।
List or None
डिफ़ॉल्ट:"None"
प्रदर्शित करने के लिए Tweet फ़ील्ड्स की कॉमा-सेपरेटेड सूची।
रिटर्न
GetEventsByIdResponse - प्रतिक्रिया डेटा
get_events_by_participant_id
किसी DM वार्तालाप के लिए DM इवेंट्स प्राप्त करें
किसी विशिष्ट वार्तालाप के लिए डायरेक्ट मैसेज इवेंट्स प्राप्त करता है।
पैरामीटर
Any
One to One DM वार्तालाप में प्रतिभागी उपयोगकर्ता की ID।
int or None
डिफ़ॉल्ट:"None"
परिणामों की अधिकतम संख्या।
Any or None
डिफ़ॉल्ट:"None"
इस पैरामीटर का उपयोग परिणामों का कोई निर्दिष्ट ‘पेज’ प्राप्त करने के लिए किया जाता है।
List or None
डिफ़ॉल्ट:"None"
परिणामों में शामिल किए जाने वाले event_types का सेट।
List or None
डिफ़ॉल्ट:"None"
प्रदर्शित करने के लिए DmEvent फ़ील्ड्स की अल्पविराम से अलग की गई सूची।
List or None
डिफ़ॉल्ट:"None"
विस्तार के लिए फ़ील्ड्स की अल्पविराम से अलग की गई सूची।
List or None
डिफ़ॉल्ट:"None"
प्रदर्शित करने के लिए Media फ़ील्ड्स की अल्पविराम से अलग की गई सूची।
List or None
डिफ़ॉल्ट:"None"
प्रदर्शित करने के लिए User फ़ील्ड्स की अल्पविराम से अलग की गई सूची।
List or None
डिफ़ॉल्ट:"None"
प्रदर्शित करने के लिए Tweet फ़ील्ड्स की अल्पविराम से अलग की गई सूची।
रिटर्न
IteratorGetEventsByParticipantIdResponse
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"X","colors":{"primary":"#0E0E0E","light":"#B0B0B0","dark":"#0E0E0E"},"logo":{"light":"https://mintcdn.com/generaltranslation/p-tsc5qa00w8y5M4/logo/light.svg?fit=max\u0026auto=format\u0026n=p-tsc5qa00w8y5M4\u0026q=85\u0026s=299a991122fb35a82f868bc62a8be1ae","dark":"https://mintcdn.com/generaltranslation/p-tsc5qa00w8y5M4/logo/dark.svg?fit=max\u0026auto=format\u0026n=p-tsc5qa00w8y5M4\u0026q=85\u0026s=06e5086f68ab588cc44787b665898b75"},"favicon":"/favicon.png","appearance":{"default":"dark","strict":true},"background":{"color":{"dark":"#050505"}},"navbar":{"links":[{"href":"https://developer.x.com/en/support","label":"Support"}],"primary":{"type":"button","label":"Developer Console","href":"https://developer.x.com/en/portal/petition/essential/basic-info"}},"footer":{"socials":{"x":"https://x.com/xdevelopers","github":"https://github.com/xdevplatform"},"links":[{"header":"Legal","items":[{"label":"Terms of Service","href":"https://x.com/en/tos"},{"label":"Privacy Policy","href":"https://x.com/en/privacy"},{"label":"Cookies","href":"https://help.x.com/en/rules-and-policies/x-cookies"},{"label":"Developer Terms","href":"https://docs.x.com/developer-terms"}]}]},"seo":{"metatags":{"canonical":"https://docs.x.com","og:site_name":"X Developer Platform","og:type":"website","og:locale":"en_US","twitter:card":"summary_large_image","twitter:site":"@xdevelopers","description":"Build, analyze, and innovate with X's real-time, global data and APIs. Access comprehensive API documentation, SDKs, tutorials, and developer tools.","author":"X Developer Platform","language":"en","robots":"index, follow","googlebot":"index, follow"},"indexing":"all"},"contextual":{"options":["copy","view",{"title":"Open in Grok","description":"Ask questions about this page","icon":"/logo/grok.svg","href":{"base":"https://grok.com","query":[{"key":"q","value":"Read from https://docs.x.com$path so I can ask questions about it."}]}}],"display":"header"},"styling":{"latex":true},"navigation":{"languages":[{"language":"en","href":"overview"},{"language":"es","href":"es/overview"},{"language":"fr","href":"fr/overview"},{"language":"hi","href":"hi/overview"},{"language":"ja","href":"ja/overview"},{"language":"ko","href":"ko/overview"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"generaltranslation","hasAudioNarration":false,"actualSubdomain":"generaltranslation","customDomains":[],"gitSource":{"type":"github","owner":"fernando-aviles","repo":"x-docs","deployBranch":"locadex/setup-1769989792329","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6ae92afb0a94bfe43457bdcb:success","clientVersion":"0.0.4143","searchFilterCounts":[{"language":"en","tag":"API Reference","count":371},{"language":"es","tag":"Referencia de la API","count":371},{"language":"fr","tag":"Référence de l’API","count":371},{"language":"hi","tag":"API संदर्भ","count":371},{"language":"ja","tag":"APIリファレンス","count":371},{"language":"ko","tag":"API 참조 문서","count":371},{"language":"en","tag":"TypeScript SDK","count":315},{"language":"es","tag":"SDK de TypeScript","count":315},{"language":"fr","tag":"SDK TypeScript","count":315},{"language":"hi","tag":"TypeScript SDK","count":315},{"language":"ja","tag":"TypeScript SDK","count":315},{"language":"ko","tag":"TypeScript SDK","count":315},{"language":"en","tag":"X API","count":295},{"language":"es","tag":"X API","count":294},{"language":"fr","tag":"X API","count":294},{"language":"hi","tag":"X API","count":294},{"language":"ja","tag":"X API","count":294},{"language":"ko","tag":"X API","count":294},{"language":"en","tag":"Interfaces","count":284},{"language":"es","tag":"Interfaces","count":284},{"language":"fr","tag":"Interfaces","count":284},{"language":"hi","tag":"इंटरफेस","count":284},{"language":"ja","tag":"インターフェイス","count":284},{"language":"ko","tag":"인터페이스","count":284},{"language":"en","tag":"Misc","count":281},{"language":"es","tag":"Varios","count":281},{"language":"fr","tag":"Divers","count":281},{"language":"hi","tag":"विविध","count":281},{"language":"ja","tag":"その他","count":281},{"language":"ko","tag":"기타","count":281},{"language":"en","tag":"Posts","count":78},{"language":"es","tag":"Publicaciones","count":78},{"language":"fr","tag":"Publications","count":78},{"language":"hi","tag":"पोस्ट्स","count":78},{"language":"ja","tag":"投稿","count":78},{"language":"ko","tag":"포스트","count":78},{"language":"en","tag":"Guides","count":76},{"language":"es","tag":"Guías","count":76},{"language":"fr","tag":"Guides","count":76},{"language":"ja","tag":"ガイド","count":76},{"language":"ko","tag":"가이드","count":76},{"language":"en","tag":"Python SDK","count":67},{"language":"es","tag":"SDK de Python","count":67},{"language":"fr","tag":"SDK Python","count":67},{"language":"hi","tag":"Python SDK","count":67},{"language":"ja","tag":"Python SDK","count":67},{"language":"ko","tag":"Python SDK","count":67},{"language":"en","tag":"Fundamentals","count":56},{"language":"hi","tag":"मार्गदर्शिकाएँ","count":50},{"language":"es","tag":"Conceptos básicos","count":43},{"language":"ko","tag":"기본 개념","count":43},{"language":"en","tag":"Lists","count":40},{"language":"es","tag":"Listas","count":40},{"language":"fr","tag":"Listes","count":40},{"language":"hi","tag":"सूचियाँ","count":40},{"language":"ja","tag":"リスト","count":40},{"language":"ko","tag":"리스트","count":40},{"language":"hi","tag":"बुनियादी बातें","count":39},{"language":"fr","tag":"Accueil","count":37},{"language":"ja","tag":"ホーム","count":37}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"@font-face{font-family:\"GraphikWide\";src:url(\"https://mintlify-assets.b-cdn.net/x/GraphikWide-Semibold-Trial.woff\") format(\"woff\");font-weight:600}.font-branded,h1,h2,h3{font-family:\"GraphikWide\";letter-spacing:-1%}.form{padding:15px;width:100%;min-height:300px;overflow-y:auto}.rate-limit-table th{text-align:left}tr td[data-label=\"Endpoint\"] a{font-size:12px}tr td[data-label=\"Pro Limit\"],tr td[data-label=\"Basic Limit\"],tr td[data-label=\"Free Limit\"]{font-size:12px}td[data-label=\"Pro Limit\"] strong,td[data-label=\"Basic Limit\"] strong,td[data-label=\"Free Limit\"] strong{margin-bottom:8px;display:block}.text-hero{color:white;font-weight:600;font-size:3rem;margin:0}@media (max-width: 767px){.text-hero{font-size:2rem}}#assistant-entry span{font-size:0!important;line-height:0!important}#assistant-entry span::before{content:\"Ask Grok\";font-size:0.875rem;line-height:1.5rem}#assistant-entry svg{display:none!important}#assistant-entry::before{content:\"\";display:inline-block;width:18px;height:18px;background-image:url(\"data:image/svg+xml,%3Csvg fill='%23000000' fill-rule='evenodd' height='1em' style='flex:none;line-height:1' viewBox='0 0 24 24' width='1em' xmlns='http://www.w3.org/2000/svg'%3E%3Ctitle%3EGrok%3C/title%3E%3Cpath d='M9.27 15.29l7.978-5.897c.391-.29.95-.177 1.137.272.98 2.369.542 5.215-1.41 7.169-1.951 1.954-4.667 2.382-7.149 1.406l-2.711 1.257c3.889 2.661 8.611 2.003 11.562-.953 2.341-2.344 3.066-5.539 2.388-8.42l.006.007c-.983-4.232.242-5.924 2.75-9.383.06-.082.12-.164.179-.248l-3.301 3.305v-.01L9.267 15.292M7.623 16.723c-2.792-2.67-2.31-6.801.071-9.184 1.761-1.763 4.647-2.483 7.166-1.425l2.705-1.25a7.808 7.808 0 00-1.829-1A8.975 8.975 0 005.984 5.83c-2.533 2.536-3.33 6.436-1.962 9.764 1.022 2.487-.653 4.246-2.34 6.022-.599.63-1.199 1.259-1.682 1.925l7.62-6.815'/%3E%3C/svg%3E\");background-repeat:no-repeat;background-size:contain;vertical-align:middle}.dark #assistant-entry::before{background-image:url(\"data:image/svg+xml,%3Csvg fill='%23ffffff' fill-rule='evenodd' height='1em' style='flex:none;line-height:1' viewBox='0 0 24 24' width='1em' xmlns='http://www.w3.org/2000/svg'%3E%3Ctitle%3EGrok%3C/title%3E%3Cpath d='M9.27 15.29l7.978-5.897c.391-.29.95-.177 1.137.272.98 2.369.542 5.215-1.41 7.169-1.951 1.954-4.667 2.382-7.149 1.406l-2.711 1.257c3.889 2.661 8.611 2.003 11.562-.953 2.341-2.344 3.066-5.539 2.388-8.42l.006.007c-.983-4.232.242-5.924 2.75-9.383.06-.082.12-.164.179-.248l-3.301 3.305v-.01L9.267 15.292M7.623 16.723c-2.792-2.67-2.31-6.801.071-9.184 1.761-1.763 4.647-2.483 7.166-1.425l2.705-1.25a7.808 7.808 0 00-1.829-1A8.975 8.975 0 005.984 5.83c-2.533 2.536-3.33 6.436-1.962 9.764 1.022 2.487-.653 4.246-2.34 6.022-.599.63-1.199 1.259-1.682 1.925l7.62-6.815'/%3E%3C/svg%3E\")}.chat-assistant-sheet-header span.font-semibold{font-size:0!important}.chat-assistant-sheet-header span.font-semibold::before{content:\"Grok\";font-size:0.875rem;font-weight:600}.chat-assistant-sheet-header svg.size-5.text-primary.dark\\:text-primary-light{display:none!important}.chat-assistant-sheet-header .flex.items-center.gap-2::before{content:\"\";display:inline-block;width:18px;height:18px;background-image:url(\"data:image/svg+xml,%3Csvg fill='%23000000' fill-rule='evenodd' height='1em' style='flex:none;line-height:1' viewBox='0 0 24 24' width='1em' xmlns='http://www.w3.org/2000/svg'%3E%3Ctitle%3EGrok%3C/title%3E%3Cpath d='M9.27 15.29l7.978-5.897c.391-.29.95-.177 1.137.272.98 2.369.542 5.215-1.41 7.169-1.951 1.954-4.667 2.382-7.149 1.406l-2.711 1.257c3.889 2.661 8.611 2.003 11.562-.953 2.341-2.344 3.066-5.539 2.388-8.42l.006.007c-.983-4.232.242-5.924 2.75-9.383.06-.082.12-.164.179-.248l-3.301 3.305v-.01L9.267 15.292M7.623 16.723c-2.792-2.67-2.31-6.801.071-9.184 1.761-1.763 4.647-2.483 7.166-1.425l2.705-1.25a7.808 7.808 0 00-1.829-1A8.975 8.975 0 005.984 5.83c-2.533 2.536-3.33 6.436-1.962 9.764 1.022 2.487-.653 4.246-2.34 6.022-.599.63-1.199 1.259-1.682 1.925l7.62-6.815'/%3E%3C/svg%3E\");background-repeat:no-repeat;background-size:contain;vertical-align:middle}.dark .chat-assistant-sheet-header .flex.items-center.gap-2::before{background-image:url(\"data:image/svg+xml,%3Csvg fill='%23ffffff' fill-rule='evenodd' height='1em' style='flex:none;line-height:1' viewBox='0 0 24 24' width='1em' xmlns='http://www.w3.org/2000/svg'%3E%3Ctitle%3EGrok%3C/title%3E%3Cpath d='M9.27 15.29l7.978-5.897c.391-.29.95-.177 1.137.272.98 2.369.542 5.215-1.41 7.169-1.951 1.954-4.667 2.382-7.149 1.406l-2.711 1.257c3.889 2.661 8.611 2.003 11.562-.953 2.341-2.344 3.066-5.539 2.388-8.42l.006.007c-.983-4.232.242-5.924 2.75-9.383.06-.082.12-.164.179-.248l-3.301 3.305v-.01L9.267 15.292M7.623 16.723c-2.792-2.67-2.31-6.801.071-9.184 1.761-1.763 4.647-2.483 7.166-1.425l2.705-1.25a7.808 7.808 0 00-1.829-1A8.975 8.975 0 005.984 5.83c-2.533 2.536-3.33 6.436-1.962 9.764 1.022 2.487-.653 4.246-2.34 6.022-.599.63-1.199 1.259-1.682 1.925l7.62-6.815'/%3E%3C/svg%3E\")}[data-component-part=\"update-label\"]{background-color:white;color:black!important}#navbar>*:nth-child(2){max-width:none!important;margin-left:0!important;margin-right:0!important}#sidebar{left:0!important}#sidebar-content{padding-left:2rem}#injected-slider{max-width:400px}#cost-estimator-button{position:relative}#cost-estimator-dropdown{min-width:400px;box-shadow:0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)}#usage-slider{-webkit-appearance:none;appearance:none;height:6px;background:#e5e7eb;outline:none;border-radius:3px}.dark #usage-slider{background:rgba(255, 255, 255, 0.1)}#usage-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:16px;height:16px;background:white;border:2px solid #00BA7C;border-radius:50%;cursor:pointer}.dark #usage-slider::-webkit-slider-thumb{background:#0B0C0E}#usage-slider::-moz-range-thumb{width:16px;height:16px;background:white;border:2px solid #00BA7C;border-radius:50%;cursor:pointer}.dark #usage-slider::-moz-range-thumb{background:#0B0C0E}"}],"page":{"pagePath":"hi/xdks/python/reference/xdk.direct_messages","slug":"/hi/xdks/python/reference/xdk.direct_messages","pageMetadata":{"title":"DirectMessagesClient","sidebarTitle":"DirectMessagesClient","description":null,"href":"/hi/xdks/python/reference/xdk.direct_messages","hidden":true},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,ul:`ul`,..._provideComponents(),...props.components},{Heading,ParamField}=_components;if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);return _jsxs(_Fragment,{children:[_jsx(`div`,{id:`submodules`,children:_jsx(Heading,{level:`2`,id:`सबमॉड्यूल`,children:`सबमॉड्यूल`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/hi/xdks/python/reference/xdk.direct_messages.client`,children:`xdk.direct_messages.client मॉड्यूल`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/hi/xdks/python/reference/xdk.direct_messages.client#xdk.direct_messages.client.DirectMessagesClient`,children:_jsx(_components.code,{children:`DirectMessagesClient`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/hi/xdks/python/reference/xdk.direct_messages.client#xdk.direct_messages.client.DirectMessagesClient.__init__`,children:_jsx(_components.code,{children:`DirectMessagesClient.__init__()`})})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/hi/xdks/python/reference/xdk.direct_messages.client#xdk.direct_messages.client.DirectMessagesClient.create_by_conversation_id`,children:_jsx(_components.code,{children:`DirectMessagesClient.create_by_conversation_id()`})})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/hi/xdks/python/reference/xdk.direct_messages.client#xdk.direct_messages.client.DirectMessagesClient.create_by_participant_id`,children:_jsx(_components.code,{children:`DirectMessagesClient.create_by_participant_id()`})})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/hi/xdks/python/reference/xdk.direct_messages.client#xdk.direct_messages.client.DirectMessagesClient.create_conversation`,children:_jsx(_components.code,{children:`DirectMessagesClient.create_conversation()`})})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/hi/xdks/python/reference/xdk.direct_messages.client#xdk.direct_messages.client.DirectMessagesClient.delete_events`,children:_jsx(_components.code,{children:`DirectMessagesClient.delete_events()`})})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/hi/xdks/python/reference/xdk.direct_messages.client#xdk.direct_messages.client.DirectMessagesClient.get_events`,children:_jsx(_components.code,{children:`DirectMessagesClient.get_events()`})})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/hi/xdks/python/reference/xdk.direct_messages.client#xdk.direct_messages.client.DirectMessagesClient.get_events_by_conversation_id`,children:_jsx(_components.code,{children:`DirectMessagesClient.get_events_by_conversation_id()`})})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/hi/xdks/python/reference/xdk.direct_messages.client#xdk.direct_messages.client.DirectMessagesClient.get_events_by_id`,children:_jsx(_components.code,{children:`DirectMessagesClient.get_events_by_id()`})})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/hi/xdks/python/reference/xdk.direct_messages.client#xdk.direct_messages.client.DirectMessagesClient.get_events_by_participant_id`,children:_jsx(_components.code,{children:`DirectMessagesClient.get_events_by_participant_id()`})})}),`\n`]}),`\n`]}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/hi/xdks/python/reference/xdk.direct_messages.models`,children:`xdk.direct_messages.models मॉड्यूल`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/hi/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.CreateByConversationIdRequest`,children:_jsx(_components.code,{children:`CreateByConversationIdRequest`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/hi/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.CreateByConversationIdRequest.model_config`,children:_jsx(_components.code,{children:`CreateByConversationIdRequest.model_config`})})}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/hi/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.CreateByConversationIdResponse`,children:_jsx(_components.code,{children:`CreateByConversationIdResponse`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/hi/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.CreateByConversationIdResponse.model_config`,children:_jsx(_components.code,{children:`CreateByConversationIdResponse.model_config`})})}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/hi/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.CreateByParticipantIdRequest`,children:_jsx(_components.code,{children:`CreateByParticipantIdRequest`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/hi/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.CreateByParticipantIdRequest.model_config`,children:_jsx(_components.code,{children:`CreateByParticipantIdRequest.model_config`})})}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/hi/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.CreateByParticipantIdResponse`,children:_jsx(_components.code,{children:`CreateByParticipantIdResponse`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/hi/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.CreateByParticipantIdResponse.model_config`,children:_jsx(_components.code,{children:`CreateByParticipantIdResponse.model_config`})})}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/hi/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.CreateConversationRequest`,children:_jsx(_components.code,{children:`CreateConversationRequest`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/hi/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.CreateConversationRequest.model_config`,children:_jsx(_components.code,{children:`CreateConversationRequest.model_config`})})}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/hi/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.CreateConversationResponse`,children:_jsx(_components.code,{children:`CreateConversationResponse`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/hi/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.CreateConversationResponse.model_config`,children:_jsx(_components.code,{children:`CreateConversationResponse.model_config`})})}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/hi/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.DeleteEventsResponse`,children:_jsx(_components.code,{children:`DeleteEventsResponse`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/hi/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.DeleteEventsResponse.model_config`,children:_jsx(_components.code,{children:`DeleteEventsResponse.model_config`})})}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/hi/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.GetEventsByConversationIdResponse`,children:_jsx(_components.code,{children:`GetEventsByConversationIdResponse`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/hi/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.GetEventsByConversationIdResponse.model_config`,children:_jsx(_components.code,{children:`GetEventsByConversationIdResponse.model_config`})})}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/hi/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.GetEventsByIdResponse`,children:_jsx(_components.code,{children:`GetEventsByIdResponse`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/hi/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.GetEventsByIdResponse.model_config`,children:_jsx(_components.code,{children:`GetEventsByIdResponse.model_config`})})}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/hi/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.GetEventsByParticipantIdResponse`,children:_jsx(_components.code,{children:`GetEventsByParticipantIdResponse`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/hi/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.GetEventsByParticipantIdResponse.model_config`,children:_jsx(_components.code,{children:`GetEventsByParticipantIdResponse.model_config`})})}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/hi/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.GetEventsResponse`,children:_jsx(_components.code,{children:`GetEventsResponse`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/hi/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.GetEventsResponse.model_config`,children:_jsx(_components.code,{children:`GetEventsResponse.model_config`})})}),`\n`]}),`\n`]}),`\n`]}),`\n`]}),`\n`]}),`\n`,_jsx(`div`,{id:`module-contents`,children:_jsx(Heading,{level:`2`,id:`मॉड्यूल-की-सामग्री`,children:`मॉड्यूल की सामग्री`})}),`\n`,_jsx(_components.p,{children:`यह मॉड्यूल X API के डायरेक्ट मैसेज एंडपॉइंट्स तक पहुँच प्रदान करता है\nऔर डायरेक्ट मैसेज से जुड़ी सभी कार्यक्षमताओं के लिए मुख्य प्रवेश-बिंदु के रूप में काम करता है।`}),`\n`,_jsx(`div`,{id:`class-xdkdirect_messagesdirectmessagesclient`,children:_jsx(Heading,{level:`3`,id:`class-xdk-direct_messages-directmessagesclient`,children:_jsx(_components.code,{children:`class xdk.direct_messages.DirectMessagesClient`})})}),`\n`,_jsx(_components.p,{children:`डायरेक्ट मैसेज संचालन के लिए Client`}),`\n`,_jsx(`div`,{id:`parameters`,children:_jsx(Heading,{level:`4`,id:`पैरामीटर`,children:`पैरामीटर`})}),`\n`,_jsx(ParamField,{path:`path.client`,type:`Client`,id:`param-path-client`}),`\n`,_jsx(`div`,{id:`__init__`,children:_jsx(Heading,{level:`3`,id:`__init__`,children:_jsx(_components.code,{children:`__init__`})})}),`\n`,_jsx(`div`,{id:`parameters`,children:_jsx(Heading,{level:`4`,id:`पैरामीटर-2`,children:`पैरामीटर`})}),`\n`,_jsx(ParamField,{path:`path.client`,type:`Client`,id:`param-path-client-1`}),`\n`,_jsx(`div`,{id:`create_by_conversation_id`,children:_jsx(Heading,{level:`3`,id:`create_by_conversation_id`,children:_jsx(_components.code,{children:`create_by_conversation_id`})})}),`\n`,_jsx(_components.p,{children:`वार्तालाप ID द्वारा DM संदेश बनाएँ\nकिसी विशिष्ट वार्तालाप की ID के आधार पर उसे नया डायरेक्ट मैसेज भेजता है।`}),`\n`,_jsx(`div`,{id:`parameters`,children:_jsx(Heading,{level:`4`,id:`पैरामीटर-3`,children:`पैरामीटर`})}),`\n`,_jsx(ParamField,{path:`path.dm_conversation_id`,type:`str`,id:`param-path-dm-conversation-id`,children:_jsx(_components.p,{children:`DM वार्तालाप की ID।`})}),`\n`,_jsx(ParamField,{path:`body.body`,type:`CreateByConversationIdRequest`,id:`param-body-body`,children:_jsx(_components.p,{children:`अनुरोध बॉडी`})}),`\n`,_jsx(`div`,{id:`create_by_participant_id`,children:_jsx(Heading,{level:`3`,id:`create_by_participant_id`,children:_jsx(_components.code,{children:`create_by_participant_id`})})}),`\n`,_jsx(_components.p,{children:`प्रतिभागी ID के आधार पर DM संदेश बनाएँ\nकिसी विशिष्ट प्रतिभागी को उसकी ID का उपयोग करके नया डायरेक्ट मैसेज भेजता है।`}),`\n`,_jsx(`div`,{id:`parameters`,children:_jsx(Heading,{level:`4`,id:`पैरामीटर-4`,children:`पैरामीटर`})}),`\n`,_jsx(ParamField,{path:`path.participant_id`,type:`Any`,id:`param-path-participant-id`,children:_jsx(_components.p,{children:`उस प्राप्तकर्ता उपयोगकर्ता की ID, जिसे DM प्राप्त होगा।`})}),`\n`,_jsx(ParamField,{path:`body.body`,type:`CreateByParticipantIdRequest`,id:`param-body-body-1`,children:_jsx(_components.p,{children:`अनुरोध बॉडी`})}),`\n`,_jsx(`div`,{id:`create_conversation`,children:_jsx(Heading,{level:`3`,id:`create_conversation`,children:_jsx(_components.code,{children:`create_conversation`})})}),`\n`,_jsx(_components.p,{children:`DM वार्तालाप बनाएँ\nनिर्दिष्ट प्रतिभागियों के साथ एक नया डायरेक्ट मैसेज वार्तालाप शुरू करता है।\nbody: अनुरोध बॉडी\n:returns: प्रतिक्रिया डेटा\n:rtype: CreateConversationResponse`}),`\n`,_jsx(`div`,{id:`parameters`,children:_jsx(Heading,{level:`4`,id:`पैरामीटर-5`,children:`पैरामीटर`})}),`\n`,_jsx(ParamField,{path:`body.body`,type:`CreateConversationRequest`,id:`param-body-body-2`}),`\n`,_jsx(`div`,{id:`delete_events`,children:_jsx(Heading,{level:`3`,id:`delete_events`,children:_jsx(_components.code,{children:`delete_events`})})}),`\n`,_jsx(_components.p,{children:`DM इवेंट हटाएँ\nयदि वह प्रमाणीकृत उपयोगकर्ता के स्वामित्व में है, तो उसकी id के आधार पर किसी विशिष्ट डायरेक्ट मैसेज इवेंट को हटाता है।`}),`\n`,_jsx(`div`,{id:`parameters`,children:_jsx(Heading,{level:`4`,id:`पैरामीटर-6`,children:`पैरामीटर`})}),`\n`,_jsx(ParamField,{path:`path.event_id`,type:`Any`,id:`param-path-event-id`,children:_jsx(_components.p,{children:`हटाए जाने वाले डायरेक्ट मैसेज इवेंट की आईडी।`})}),`\n`,_jsx(`div`,{id:`returns`,children:_jsx(Heading,{level:`4`,id:`रिटर्न`,children:`रिटर्न`})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`DeleteEventsResponse`}),` - प्रतिक्रिया डेटा`]}),`\n`,_jsx(`div`,{id:`get_events`,children:_jsx(Heading,{level:`3`,id:`get_events`,children:_jsx(_components.code,{children:`get_events`})})}),`\n`,_jsx(_components.p,{children:`DM इवेंट्स प्राप्त करें\nसभी वार्तालापों में हाल के डायरेक्ट मैसेज इवेंट्स की एक सूची प्राप्त करता है।`}),`\n`,_jsx(`div`,{id:`parameters`,children:_jsx(Heading,{level:`4`,id:`पैरामीटर-7`,children:`पैरामीटर`})}),`\n`,_jsx(ParamField,{path:`path.max_results`,type:`int or None`,default:`None`,id:`param-path-max-results`,children:_jsx(_components.p,{children:`परिणामों की अधिकतम संख्या।`})}),`\n`,_jsx(ParamField,{path:`path.pagination_token`,type:`Any or None`,default:`None`,id:`param-path-pagination-token`,children:_jsx(_components.p,{children:`इस पैरामीटर का उपयोग परिणामों का एक निर्दिष्ट ‘पेज’ प्राप्त करने के लिए किया जाता है।`})}),`\n`,_jsx(ParamField,{path:`path.event_types`,type:`List or None`,default:`None`,id:`param-path-event-types`,children:_jsx(_components.p,{children:`परिणामों में शामिल किए जाने वाले event_types का सेट।`})}),`\n`,_jsx(ParamField,{path:`path.dm_event_fields`,type:`List or None`,default:`None`,id:`param-path-dm-event-fields`,children:_jsx(_components.p,{children:`प्रदर्शित किए जाने वाले DmEvent फ़ील्ड्स की कॉमा से अलग की गई सूची।`})}),`\n`,_jsx(ParamField,{path:`path.expansions`,type:`List or None`,default:`None`,id:`param-path-expansions`,children:_jsx(_components.p,{children:`विस्तार के लिए फ़ील्ड्स की कॉमा से अलग की गई सूची।`})}),`\n`,_jsx(ParamField,{path:`path.media_fields`,type:`List or None`,default:`None`,id:`param-path-media-fields`,children:_jsx(_components.p,{children:`प्रदर्शित किए जाने वाले Media फ़ील्ड्स की कॉमा से अलग की गई सूची।`})}),`\n`,_jsx(ParamField,{path:`path.user_fields`,type:`List or None`,default:`None`,id:`param-path-user-fields`,children:_jsx(_components.p,{children:`प्रदर्शित किए जाने वाले User फ़ील्ड्स की कॉमा से अलग की गई सूची।`})}),`\n`,_jsx(ParamField,{path:`path.tweet_fields`,type:`List or None`,default:`None`,id:`param-path-tweet-fields`,children:_jsx(_components.p,{children:`प्रदर्शित किए जाने वाले Tweet फ़ील्ड्स की कॉमा से अलग की गई सूची।`})}),`\n`,_jsx(`div`,{id:`returns`,children:_jsx(Heading,{level:`4`,id:`रिटर्न-2`,children:`रिटर्न`})}),`\n`,_jsx(_components.p,{children:_jsx(_components.code,{children:`IteratorGetEventsResponse`})}),`\n`,_jsx(`div`,{id:`get_events_by_conversation_id`,children:_jsx(Heading,{level:`3`,id:`get_events_by_conversation_id`,children:_jsx(_components.code,{children:`get_events_by_conversation_id`})})}),`\n`,_jsx(_components.p,{children:`किसी DM वार्तालाप के लिए DM इवेंट्स प्राप्त करें\nकिसी विशिष्ट वार्तालाप के लिए डायरेक्ट मैसेज इवेंट्स प्राप्त करता है।`}),`\n`,_jsx(`div`,{id:`parameters`,children:_jsx(Heading,{level:`4`,id:`पैरामीटर-8`,children:`पैरामीटर`})}),`\n`,_jsx(ParamField,{path:`path.id`,type:`Any`,id:`param-path-id`,children:_jsx(_components.p,{children:`DM वार्तालाप की ID।`})}),`\n`,_jsx(ParamField,{path:`path.max_results`,type:`int or None`,default:`None`,id:`param-path-max-results-1`,children:_jsx(_components.p,{children:`परिणामों की अधिकतम संख्या।`})}),`\n`,_jsx(ParamField,{path:`path.pagination_token`,type:`Any or None`,default:`None`,id:`param-path-pagination-token-1`,children:_jsx(_components.p,{children:`इस पैरामीटर का उपयोग परिणामों का एक निर्दिष्ट ‘पेज’ प्राप्त करने के लिए किया जाता है।`})}),`\n`,_jsx(ParamField,{path:`path.event_types`,type:`List or None`,default:`None`,id:`param-path-event-types-1`,children:_jsx(_components.p,{children:`परिणामों में शामिल किए जाने वाले event_types का सेट।`})}),`\n`,_jsx(ParamField,{path:`path.dm_event_fields`,type:`List or None`,default:`None`,id:`param-path-dm-event-fields-1`,children:_jsx(_components.p,{children:`प्रदर्शित किए जाने वाले DmEvent फ़ील्ड्स की अल्पविराम-से-अलग की गई सूची।`})}),`\n`,_jsx(ParamField,{path:`path.expansions`,type:`List or None`,default:`None`,id:`param-path-expansions-1`,children:_jsx(_components.p,{children:`विस्तारित किए जाने वाले फ़ील्ड्स की अल्पविराम-से-अलग की गई सूची।`})}),`\n`,_jsx(ParamField,{path:`path.media_fields`,type:`List or None`,default:`None`,id:`param-path-media-fields-1`,children:_jsx(_components.p,{children:`प्रदर्शित किए जाने वाले Media फ़ील्ड्स की अल्पविराम-से-अलग की गई सूची।`})}),`\n`,_jsx(ParamField,{path:`path.user_fields`,type:`List or None`,default:`None`,id:`param-path-user-fields-1`,children:_jsx(_components.p,{children:`प्रदर्शित किए जाने वाले User फ़ील्ड्स की अल्पविराम-से-अलग की गई सूची।`})}),`\n`,_jsx(ParamField,{path:`path.tweet_fields`,type:`List or None`,default:`None`,id:`param-path-tweet-fields-1`,children:_jsx(_components.p,{children:`प्रदर्शित किए जाने वाले Tweet फ़ील्ड्स की अल्पविराम-से-अलग की गई सूची।`})}),`\n`,_jsx(`div`,{id:`returns`,children:_jsx(Heading,{level:`4`,id:`रिटर्न-3`,children:`रिटर्न`})}),`\n`,_jsx(_components.p,{children:_jsx(_components.code,{children:`IteratorGetEventsByConversationIdResponse`})}),`\n`,_jsx(`div`,{id:`get_events_by_id`,children:_jsx(Heading,{level:`3`,id:`get_events_by_id`,children:_jsx(_components.code,{children:`get_events_by_id`})})}),`\n`,_jsx(_components.p,{children:`ID से DM इवेंट प्राप्त करें\nकिसी विशिष्ट डायरेक्ट मैसेज इवेंट का विवरण उसकी ID के आधार पर प्राप्त करता है।`}),`\n`,_jsx(`div`,{id:`parameters`,children:_jsx(Heading,{level:`4`,id:`पैरामीटर-9`,children:`पैरामीटर`})}),`\n`,_jsx(ParamField,{path:`path.event_id`,type:`Any`,id:`param-path-event-id-1`,children:_jsx(_components.p,{children:`dm इवेंट id.`})}),`\n`,_jsx(ParamField,{path:`path.dm_event_fields`,type:`List or None`,default:`None`,id:`param-path-dm-event-fields-2`,children:_jsx(_components.p,{children:`प्रदर्शित करने के लिए DmEvent फ़ील्ड्स की कॉमा-सेपरेटेड सूची।`})}),`\n`,_jsx(ParamField,{path:`path.expansions`,type:`List or None`,default:`None`,id:`param-path-expansions-2`,children:_jsx(_components.p,{children:`विस्तारित करने के लिए फ़ील्ड्स की कॉमा-सेपरेटेड सूची।`})}),`\n`,_jsx(ParamField,{path:`path.media_fields`,type:`List or None`,default:`None`,id:`param-path-media-fields-2`,children:_jsx(_components.p,{children:`प्रदर्शित करने के लिए Media फ़ील्ड्स की कॉमा-सेपरेटेड सूची।`})}),`\n`,_jsx(ParamField,{path:`path.user_fields`,type:`List or None`,default:`None`,id:`param-path-user-fields-2`,children:_jsx(_components.p,{children:`प्रदर्शित करने के लिए User फ़ील्ड्स की कॉमा-सेपरेटेड सूची।`})}),`\n`,_jsx(ParamField,{path:`path.tweet_fields`,type:`List or None`,default:`None`,id:`param-path-tweet-fields-2`,children:_jsx(_components.p,{children:`प्रदर्शित करने के लिए Tweet फ़ील्ड्स की कॉमा-सेपरेटेड सूची।`})}),`\n`,_jsx(`div`,{id:`returns`,children:_jsx(Heading,{level:`4`,id:`रिटर्न-4`,children:`रिटर्न`})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`GetEventsByIdResponse`}),` - प्रतिक्रिया डेटा`]}),`\n`,_jsx(`div`,{id:`get_events_by_participant_id`,children:_jsx(Heading,{level:`3`,id:`get_events_by_participant_id`,children:_jsx(_components.code,{children:`get_events_by_participant_id`})})}),`\n`,_jsx(_components.p,{children:`किसी DM वार्तालाप के लिए DM इवेंट्स प्राप्त करें\nकिसी विशिष्ट वार्तालाप के लिए डायरेक्ट मैसेज इवेंट्स प्राप्त करता है।`}),`\n`,_jsx(`div`,{id:`parameters`,children:_jsx(Heading,{level:`4`,id:`पैरामीटर-10`,children:`पैरामीटर`})}),`\n`,_jsx(ParamField,{path:`path.participant_id`,type:`Any`,id:`param-path-participant-id-1`,children:_jsx(_components.p,{children:`One to One DM वार्तालाप में प्रतिभागी उपयोगकर्ता की ID।`})}),`\n`,_jsx(ParamField,{path:`path.max_results`,type:`int or None`,default:`None`,id:`param-path-max-results-2`,children:_jsx(_components.p,{children:`परिणामों की अधिकतम संख्या।`})}),`\n`,_jsx(ParamField,{path:`path.pagination_token`,type:`Any or None`,default:`None`,id:`param-path-pagination-token-2`,children:_jsx(_components.p,{children:`इस पैरामीटर का उपयोग परिणामों का कोई निर्दिष्ट ‘पेज’ प्राप्त करने के लिए किया जाता है।`})}),`\n`,_jsx(ParamField,{path:`path.event_types`,type:`List or None`,default:`None`,id:`param-path-event-types-2`,children:_jsx(_components.p,{children:`परिणामों में शामिल किए जाने वाले event_types का सेट।`})}),`\n`,_jsx(ParamField,{path:`path.dm_event_fields`,type:`List or None`,default:`None`,id:`param-path-dm-event-fields-3`,children:_jsx(_components.p,{children:`प्रदर्शित करने के लिए DmEvent फ़ील्ड्स की अल्पविराम से अलग की गई सूची।`})}),`\n`,_jsx(ParamField,{path:`path.expansions`,type:`List or None`,default:`None`,id:`param-path-expansions-3`,children:_jsx(_components.p,{children:`विस्तार के लिए फ़ील्ड्स की अल्पविराम से अलग की गई सूची।`})}),`\n`,_jsx(ParamField,{path:`path.media_fields`,type:`List or None`,default:`None`,id:`param-path-media-fields-3`,children:_jsx(_components.p,{children:`प्रदर्शित करने के लिए Media फ़ील्ड्स की अल्पविराम से अलग की गई सूची।`})}),`\n`,_jsx(ParamField,{path:`path.user_fields`,type:`List or None`,default:`None`,id:`param-path-user-fields-3`,children:_jsx(_components.p,{children:`प्रदर्शित करने के लिए User फ़ील्ड्स की अल्पविराम से अलग की गई सूची।`})}),`\n`,_jsx(ParamField,{path:`path.tweet_fields`,type:`List or None`,default:`None`,id:`param-path-tweet-fields-3`,children:_jsx(_components.p,{children:`प्रदर्शित करने के लिए Tweet फ़ील्ड्स की अल्पविराम से अलग की गई सूची।`})}),`\n`,_jsx(`div`,{id:`returns`,children:_jsx(Heading,{level:`4`,id:`रिटर्न-5`,children:`रिटर्न`})}),`\n`,_jsx(_components.p,{children:_jsx(_components.code,{children:`IteratorGetEventsByParticipantIdResponse`})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"DirectMessagesClient","sidebarTitle":"DirectMessagesClient","description":null,"href":"/hi/xdks/python/reference/xdk.direct_messages","hidden":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"सबमॉड्यूल","slug":"सबमॉड्यूल","depth":2,"children":[]},{"title":"मॉड्यूल की सामग्री","slug":"मॉड्यूल-की-सामग्री","depth":2,"children":[{"title":"class xdk.direct_messages.DirectMessagesClient","slug":"class-xdk-direct_messages-directmessagesclient","depth":3,"children":[]},{"title":"पैरामीटर","slug":"पैरामीटर","depth":4,"children":[]},{"title":"__init__","slug":"__init__","depth":3,"children":[]},{"title":"पैरामीटर","slug":"पैरामीटर-2","depth":4,"children":[]},{"title":"create_by_conversation_id","slug":"create_by_conversation_id","depth":3,"children":[]},{"title":"पैरामीटर","slug":"पैरामीटर-3","depth":4,"children":[]},{"title":"create_by_participant_id","slug":"create_by_participant_id","depth":3,"children":[]},{"title":"पैरामीटर","slug":"पैरामीटर-4","depth":4,"children":[]},{"title":"create_conversation","slug":"create_conversation","depth":3,"children":[]},{"title":"पैरामीटर","slug":"पैरामीटर-5","depth":4,"children":[]},{"title":"delete_events","slug":"delete_events","depth":3,"children":[]},{"title":"पैरामीटर","slug":"पैरामीटर-6","depth":4,"children":[]},{"title":"रिटर्न","slug":"रिटर्न","depth":4,"children":[]},{"title":"get_events","slug":"get_events","depth":3,"children":[]},{"title":"पैरामीटर","slug":"पैरामीटर-7","depth":4,"children":[]},{"title":"रिटर्न","slug":"रिटर्न-2","depth":4,"children":[]},{"title":"get_events_by_conversation_id","slug":"get_events_by_conversation_id","depth":3,"children":[]},{"title":"पैरामीटर","slug":"पैरामीटर-8","depth":4,"children":[]},{"title":"रिटर्न","slug":"रिटर्न-3","depth":4,"children":[]},{"title":"get_events_by_id","slug":"get_events_by_id","depth":3,"children":[]},{"title":"पैरामीटर","slug":"पैरामीटर-9","depth":4,"children":[]},{"title":"रिटर्न","slug":"रिटर्न-4","depth":4,"children":[]},{"title":"get_events_by_participant_id","slug":"get_events_by_participant_id","depth":3,"children":[]},{"title":"पैरामीटर","slug":"पैरामीटर-10","depth":4,"children":[]},{"title":"रिटर्न","slug":"रिटर्न-5","depth":4,"children":[]}]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/generaltranslation/f67e695317871503/widgets.js","/_mintlify/custom/generaltranslation/dd4721d49d6e0698/sliders.js"],"subdomain":"generaltranslation","siteName":"X","title":"DirectMessagesClient - X","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/xdks/python/reference/xdk.direct_messages","matchLevel":1,"hidden":true},"es":{"href":"/es/xdks/python/reference/xdk.direct_messages","matchLevel":1,"hidden":true},"fr":{"href":"/fr/xdks/python/reference/xdk.direct_messages","matchLevel":1,"hidden":true},"hi":{"href":"/hi/xdks/python/reference/xdk.direct_messages","matchLevel":0},"ja":{"href":"/ja/xdks/python/reference/xdk.direct_messages","matchLevel":1,"hidden":true},"ko":{"href":"/ko/xdks/python/reference/xdk.direct_messages","matchLevel":1,"hidden":true}}},"lastModified":"2026-04-02T03:58:09.018Z","originalFileLocation":"hi/xdks/python/reference/xdk.direct_messages.mdx","locale":"hi"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=\"dark\";if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Build, analyze, and innovate with X\u0026#x27;s real-time, global data and APIs. Access comprehensive API documentation, SDKs, tutorials, and developer tools.\">\u003cmeta data-mint-head name=\"application-name\" content=\"X\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003cmeta data-mint-head name=\"robots\" content=\"index, follow\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/generaltranslation/3OgqNYd4DMBAanRo/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/generaltranslation/3OgqNYd4DMBAanRo/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/generaltranslation/3OgqNYd4DMBAanRo/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/generaltranslation/3OgqNYd4DMBAanRo/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/generaltranslation/3OgqNYd4DMBAanRo/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/generaltranslation/3OgqNYd4DMBAanRo/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/generaltranslation/3OgqNYd4DMBAanRo/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/generaltranslation/3OgqNYd4DMBAanRo/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/generaltranslation/3OgqNYd4DMBAanRo/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"DirectMessagesClient - X\">\u003cmeta data-mint-head property=\"og:description\" content=\"Build, analyze, and innovate with X\u0026#x27;s real-time, global data and APIs. Access comprehensive API documentation, SDKs, tutorials, and developer tools.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"X Developer Platform\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.x.com/hi/xdks/python/reference/xdk.direct_messages\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://generaltranslation.mintlify.site/_mintlify/api/og/v2?division=%E0%A4%A1%E0%A4%BE%E0%A4%AF%E0%A4%B0%E0%A5%87%E0%A4%95%E0%A5%8D%E0%A4%9F+%E0%A4%AE%E0%A5%88%E0%A4%B8%E0%A5%87%E0%A4%9C\u0026amp;title=DirectMessagesClient\u0026amp;theme=3199bd2c292b5ac8dc3f7441\u0026amp;signature=fc09bff130b0897eb09827d2e103c9ea07d64b09f0a1098a6e5bcd82bebdc0e7\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"DirectMessagesClient - X\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Build, analyze, and innovate with X\u0026#x27;s real-time, global data and APIs. Access comprehensive API documentation, SDKs, tutorials, and developer tools.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://generaltranslation.mintlify.site/_mintlify/api/og/v2?division=%E0%A4%A1%E0%A4%BE%E0%A4%AF%E0%A4%B0%E0%A5%87%E0%A4%95%E0%A5%8D%E0%A4%9F+%E0%A4%AE%E0%A5%88%E0%A4%B8%E0%A5%87%E0%A4%9C\u0026amp;title=DirectMessagesClient\u0026amp;theme=3199bd2c292b5ac8dc3f7441\u0026amp;signature=fc09bff130b0897eb09827d2e103c9ea07d64b09f0a1098a6e5bcd82bebdc0e7\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/generaltranslation/3OgqNYd4DMBAanRo/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"X\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0E0E0E\">\u003cmeta data-mint-head name=\"og:locale\" content=\"en_US\">\u003cmeta data-mint-head name=\"author\" content=\"X Developer Platform\">\u003cmeta data-mint-head name=\"language\" content=\"en\">\u003cmeta data-mint-head name=\"googlebot\" content=\"index, follow\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.x.com/hi/xdks/python/reference/xdk.direct_messages\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/hi/xdks/python/reference/xdk.direct_messages.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"hi\" href=\"https://docs.x.com/hi/xdks/python/reference/xdk.direct_messages\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.x.com/xdks/python/reference/xdk.direct_messages\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"es\" href=\"https://docs.x.com/es/xdks/python/reference/xdk.direct_messages\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"fr\" href=\"https://docs.x.com/fr/xdks/python/reference/xdk.direct_messages\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ja\" href=\"https://docs.x.com/ja/xdks/python/reference/xdk.direct_messages\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ko\" href=\"https://docs.x.com/ko/xdks/python/reference/xdk.direct_messages\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.x.com/xdks/python/reference/xdk.direct_messages\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.x.com/#organization\",\"name\":\"X\",\"url\":\"https://docs.x.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/generaltranslation/p-tsc5qa00w8y5M4/logo/light.svg?fit=max\u0026auto=format\u0026n=p-tsc5qa00w8y5M4\u0026q=85\u0026s=299a991122fb35a82f868bc62a8be1ae\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.x.com#website\",\"name\":\"X\",\"url\":\"https://docs.x.com\",\"publisher\":{\"@id\":\"https://docs.x.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.x.com/hi/xdks/python/reference/xdk.direct_messages#webpage\",\"url\":\"https://docs.x.com/hi/xdks/python/reference/xdk.direct_messages\",\"name\":\"DirectMessagesClient\",\"dateModified\":\"2026-04-02T03:58:09.018Z\",\"isPartOf\":{\"@id\":\"https://docs.x.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.x.com/hi/xdks/python/reference/xdk.direct_messages#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.x.com/hi/xdks/python/reference/xdk.direct_messages#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"API संदर्भ\",\"item\":\"https://docs.x.com/hi/xdks/python/reference/modules\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"कोर\",\"item\":\"https://docs.x.com/hi/xdks/python/reference/xdk.account_activity\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"DirectMessagesClient\",\"item\":\"https://docs.x.com/hi/xdks/python/reference/xdk.direct_messages\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.x.com/hi/xdks/python/reference/xdk.direct_messages#article\",\"headline\":\"DirectMessagesClient\",\"name\":\"DirectMessagesClient\",\"url\":\"https://docs.x.com/hi/xdks/python/reference/xdk.direct_messages\",\"mainEntityOfPage\":{\"@id\":\"https://docs.x.com/hi/xdks/python/reference/xdk.direct_messages#webpage\"},\"dateModified\":\"2026-04-02T03:58:09.018Z\",\"publisher\":{\"@id\":\"https://docs.x.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.x.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"X\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"X\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/hi/xdks/python/reference/xdk.direct_messages.md","siteName":"X","nav":{"global":null,"languages":[{"language":"en","pages":[{"title":"en","href":"/xdks/python/reference/xdk.direct_messages"}]},{"language":"es","pages":[{"title":"es","href":"/es/xdks/python/reference/xdk.direct_messages"}]},{"language":"fr","pages":[{"title":"fr","href":"/fr/xdks/python/reference/xdk.direct_messages"}]},{"language":"hi","tabs":[{"tab":"मुखपृष्ठ","pages":[{"title":"मुखपृष्ठ","href":"/hi/overview"}]},{"tab":"X API","pages":[{"title":"X API","href":"/hi/x-api/introduction"}]},{"tab":"X Ads API","pages":[{"title":"X Ads API","href":"/hi/x-ads-api/introduction"}]},{"tab":"XDKs","pages":[{"title":"XDKs","href":"/hi/xdks/overview"}]},{"tab":"ट्यूटोरियल","pages":[{"title":"ट्यूटोरियल","href":"/hi/tutorials/explore-a-users-posts"}]},{"tab":"उपयोग परिदृश्य","pages":[{"title":"उपयोग परिदृश्य","href":"/hi/use-cases/build-for-business"}]},{"tab":"सफलता की कहानियाँ","pages":[{"title":"सफलता की कहानियाँ","href":"/hi/success-stories"}]},{"tab":"स्थिति","pages":[{"title":"स्थिति","href":"/hi/status"}]},{"tab":"चेंजलॉग","pages":[{"title":"चेंजलॉग","href":"/hi/changelog"}]},{"tab":"Python SDK","hidden":true,"pages":[{"title":"Python XDK","sidebarTitle":"परिचय","description":null,"href":"/hi/xdks/python/overview"},{"title":"इंस्टॉल करें","sidebarTitle":"इंस्टॉल करें","description":null,"href":"/hi/xdks/python/install"},{"title":"त्वरित शुरुआत","sidebarTitle":"त्वरित शुरुआत","description":null,"href":"/hi/xdks/python/quickstart"},{"title":"प्रमाणीकरण","sidebarTitle":"प्रमाणीकरण","description":null,"href":"/hi/xdks/python/authentication"},{"title":"पेजिनेशन","sidebarTitle":"पेजिनेशन","description":null,"href":"/hi/xdks/python/pagination"},{"title":"स्ट्रीमिंग","sidebarTitle":"स्ट्रीमिंग","description":null,"href":"/hi/xdks/python/streaming"},{"group":"API संदर्भ","pages":[{"title":"xdk","sidebarTitle":"xdk","description":null,"href":"/hi/xdks/python/reference/modules"},{"group":"क्लाइंट्स","pages":[{"group":"Account Activity","pages":[{"title":"AccountActivityClient","sidebarTitle":"AccountActivityClient","description":null,"href":"/hi/xdks/python/reference/xdk.account_activity.client"}]},{"group":"गतिविधि","pages":[{"title":"ActivityClient","sidebarTitle":"ActivityClient","description":null,"href":"/hi/xdks/python/reference/xdk.activity.client"}]},{"group":"Client","pages":[{"title":"Client","sidebarTitle":"Client","description":null,"href":"/hi/xdks/python/reference/xdk.client"}]},{"group":"Communities","pages":[{"title":"CommunitiesClient","sidebarTitle":"CommunitiesClient","description":null,"href":"/hi/xdks/python/reference/xdk.communities.client"}]},{"group":"Community Notes","pages":[{"title":"CommunityNotesClient","sidebarTitle":"CommunityNotesClient","description":null,"href":"/hi/xdks/python/reference/xdk.community_notes.client"}]},{"group":"कंप्लायंस","pages":[{"title":"ComplianceClient","sidebarTitle":"ComplianceClient","description":null,"href":"/hi/xdks/python/reference/xdk.compliance.client"}]},{"group":"कनेक्शंस","pages":[{"title":"ConnectionsClient","sidebarTitle":"ConnectionsClient","description":null,"href":"/hi/xdks/python/reference/xdk.connections.client"}]},{"group":"डायरेक्ट मैसेज","pages":[{"title":"DirectMessagesClient","sidebarTitle":"DirectMessagesClient","description":null,"href":"/hi/xdks/python/reference/xdk.direct_messages.client"}]},{"group":"सामान्य","pages":[{"title":"GeneralClient","sidebarTitle":"GeneralClient","description":null,"href":"/hi/xdks/python/reference/xdk.general.client"}]},{"group":"सूचियाँ","pages":[{"title":"ListsClient","sidebarTitle":"ListsClient","description":null,"href":"/hi/xdks/python/reference/xdk.lists.client"}]},{"group":"मीडिया","pages":[{"title":"MediaClient","sidebarTitle":"MediaClient","description":null,"href":"/hi/xdks/python/reference/xdk.media.client"}]},{"group":"समाचार","pages":[{"title":"NewsClient","sidebarTitle":"NewsClient","description":null,"href":"/hi/xdks/python/reference/xdk.news.client"}]},{"group":"पोस्ट्स","pages":[{"title":"PostsClient","sidebarTitle":"PostsClient","description":null,"href":"/hi/xdks/python/reference/xdk.posts.client"}]},{"group":"Spaces","pages":[{"title":"SpacesClient","sidebarTitle":"SpacesClient","description":null,"href":"/hi/xdks/python/reference/xdk.spaces.client"}]},{"group":"स्ट्रीम","pages":[{"title":"StreamClient","sidebarTitle":"StreamClient","description":null,"href":"/hi/xdks/python/reference/xdk.stream.client"}]},{"group":"ट्रेंड्स","pages":[{"title":"TrendsClient","sidebarTitle":"TrendsClient","description":null,"href":"/hi/xdks/python/reference/xdk.trends.client"}]},{"group":"उपयोग","pages":[{"title":"UsageClient","sidebarTitle":"UsageClient","description":null,"href":"/hi/xdks/python/reference/xdk.usage.client"}]},{"group":"उपयोगकर्ता","pages":[{"title":"UsersClient","sidebarTitle":"UsersClient","description":null,"href":"/hi/xdks/python/reference/xdk.users.client"}]},{"group":"वेबहुक्स","pages":[{"title":"WebhooksClient","sidebarTitle":"WebhooksClient","description":null,"href":"/hi/xdks/python/reference/xdk.webhooks.client"}]}]},{"group":"मॉडल्स","pages":[{"group":"Account Activity","pages":[{"title":"Account_activity.Models","sidebarTitle":"Account_activity.Models","description":null,"href":"/hi/xdks/python/reference/xdk.account_activity.models"}]},{"group":"गतिविधि","pages":[{"title":"Activity.Models","sidebarTitle":"Activity.Models","description":null,"href":"/hi/xdks/python/reference/xdk.activity.models"}]},{"group":"Communities","pages":[{"title":"Communities.Models","sidebarTitle":"Communities.Models","description":null,"href":"/hi/xdks/python/reference/xdk.communities.models"}]},{"group":"Community Notes","pages":[{"title":"Community_notes.Models","sidebarTitle":"Community_notes.Models","description":null,"href":"/hi/xdks/python/reference/xdk.community_notes.models"}]},{"group":"कंप्लायंस","pages":[{"title":"Compliance.Models","sidebarTitle":"Compliance.Models","description":null,"href":"/hi/xdks/python/reference/xdk.compliance.models"}]},{"group":"कनेक्शंस","pages":[{"title":"Connections.Models","sidebarTitle":"Connections.Models","description":null,"href":"/hi/xdks/python/reference/xdk.connections.models"}]},{"group":"डायरेक्ट मैसेज","pages":[{"title":"Direct_messages.Models","sidebarTitle":"Direct_messages.Models","description":null,"href":"/hi/xdks/python/reference/xdk.direct_messages.models"}]},{"group":"सामान्य","pages":[{"title":"General.Models","sidebarTitle":"General.Models","description":null,"href":"/hi/xdks/python/reference/xdk.general.models"}]},{"group":"सूचियाँ","pages":[{"title":"Lists.Models","sidebarTitle":"Lists.Models","description":null,"href":"/hi/xdks/python/reference/xdk.lists.models"}]},{"group":"मीडिया","pages":[{"title":"Media.Models","sidebarTitle":"Media.Models","description":null,"href":"/hi/xdks/python/reference/xdk.media.models"}]},{"group":"समाचार","pages":[{"title":"News.Models","sidebarTitle":"News.Models","description":null,"href":"/hi/xdks/python/reference/xdk.news.models"}]},{"group":"पोस्ट्स","pages":[{"title":"Posts.Models","sidebarTitle":"Posts.Models","description":null,"href":"/hi/xdks/python/reference/xdk.posts.models"}]},{"group":"Spaces","pages":[{"title":"Spaces.Models","sidebarTitle":"Spaces.Models","description":null,"href":"/hi/xdks/python/reference/xdk.spaces.models"}]},{"group":"स्ट्रीम","pages":[{"title":"Stream.Models","sidebarTitle":"Stream.Models","description":null,"href":"/hi/xdks/python/reference/xdk.stream.models"}]},{"group":"ट्रेंड्स","pages":[{"title":"Trends.Models","sidebarTitle":"Trends.Models","description":null,"href":"/hi/xdks/python/reference/xdk.trends.models"}]},{"group":"उपयोग","pages":[{"title":"Usage.Models","sidebarTitle":"Usage.Models","description":null,"href":"/hi/xdks/python/reference/xdk.usage.models"}]},{"group":"उपयोगकर्ता","pages":[{"title":"Users.Models","sidebarTitle":"Users.Models","description":null,"href":"/hi/xdks/python/reference/xdk.users.models"}]},{"group":"वेबहुक्स","pages":[{"title":"Webhooks.Models","sidebarTitle":"Webhooks.Models","description":null,"href":"/hi/xdks/python/reference/xdk.webhooks.models"}]}]},{"group":"कोर","pages":[{"group":"Account Activity","pages":[{"title":"AccountActivityClient","sidebarTitle":"AccountActivityClient","description":null,"href":"/hi/xdks/python/reference/xdk.account_activity"}]},{"group":"गतिविधि","pages":[{"title":"ActivityClient","sidebarTitle":"ActivityClient","description":null,"href":"/hi/xdks/python/reference/xdk.activity"}]},{"group":"समुदाय","pages":[{"title":"CommunitiesClient","sidebarTitle":"CommunitiesClient","description":null,"href":"/hi/xdks/python/reference/xdk.communities"}]},{"group":"Community Notes","pages":[{"title":"CommunityNotesClient","sidebarTitle":"CommunityNotesClient","description":null,"href":"/hi/xdks/python/reference/xdk.community_notes"}]},{"group":"अनुपालन","pages":[{"title":"ComplianceClient","sidebarTitle":"ComplianceClient","description":null,"href":"/hi/xdks/python/reference/xdk.compliance"}]},{"group":"कनेक्शन","pages":[{"title":"ConnectionsClient","sidebarTitle":"ConnectionsClient","description":null,"href":"/hi/xdks/python/reference/xdk.connections"}]},{"group":"डायरेक्ट मैसेज","pages":[{"title":"DirectMessagesClient","sidebarTitle":"DirectMessagesClient","href":"/hi/xdks/python/reference/xdk.direct_messages"}]},{"group":"सामान्य","pages":[{"title":"GeneralClient","sidebarTitle":"GeneralClient","description":null,"href":"/hi/xdks/python/reference/xdk.general"}]},{"group":"सूचियाँ","pages":[{"title":"ListsClient","sidebarTitle":"ListsClient","description":null,"href":"/hi/xdks/python/reference/xdk.lists"}]},{"group":"मीडिया","pages":[{"title":"MediaClient","sidebarTitle":"MediaClient","description":null,"href":"/hi/xdks/python/reference/xdk.media"}]},{"group":"समाचार","pages":[{"title":"NewsClient","sidebarTitle":"NewsClient","description":null,"href":"/hi/xdks/python/reference/xdk.news"}]},{"group":"OAuth1 प्रमाणीकरण","pages":[{"title":"oauth1_auth","sidebarTitle":"oauth1_auth","description":null,"href":"/hi/xdks/python/reference/xdk.oauth1_auth"}]},{"group":"OAuth2 प्रमाणीकरण","pages":[{"title":"OAuth2PKCEAuth","sidebarTitle":"OAuth2PKCEAuth","description":null,"href":"/hi/xdks/python/reference/xdk.oauth2_auth"}]},{"group":"पैजिनेटर","pages":[{"title":"paginator","sidebarTitle":"paginator","description":null,"href":"/hi/xdks/python/reference/xdk.paginator"}]},{"group":"पोस्ट्स","pages":[{"title":"PostsClient","sidebarTitle":"PostsClient","description":null,"href":"/hi/xdks/python/reference/xdk.posts"}]},{"group":"Spaces","pages":[{"title":"SpacesClient","sidebarTitle":"SpacesClient","description":null,"href":"/hi/xdks/python/reference/xdk.spaces"}]},{"group":"स्ट्रीम","pages":[{"title":"StreamClient","sidebarTitle":"StreamClient","description":null,"href":"/hi/xdks/python/reference/xdk.stream"}]},{"group":"स्ट्रीमिंग","pages":[{"title":"स्ट्रीमिंग","sidebarTitle":"स्ट्रीमिंग","description":null,"href":"/hi/xdks/python/reference/xdk.streaming"}]},{"group":"ट्रेंड्स","pages":[{"title":"TrendsClient","sidebarTitle":"TrendsClient","description":null,"href":"/hi/xdks/python/reference/xdk.trends"}]},{"group":"उपयोग","pages":[{"title":"UsageClient","sidebarTitle":"UsageClient","description":null,"href":"/hi/xdks/python/reference/xdk.usage"}]},{"group":"उपयोगकर्ता","pages":[{"title":"UsersClient","sidebarTitle":"UsersClient","description":null,"href":"/hi/xdks/python/reference/xdk.users"}]},{"group":"वेबहुक्स","pages":[{"title":"WebhooksClient","sidebarTitle":"WebhooksClient","description":null,"href":"/hi/xdks/python/reference/xdk.webhooks"}]},{"group":"Xdk","pages":[{"title":"Client","sidebarTitle":"Client","description":null,"href":"/hi/xdks/python/reference/xdk"}]}]}]}]},{"tab":"TypeScript SDK","hidden":true,"pages":[{"title":"TypeScript SDK","href":"/hi/xdks/typescript/overview"}]}],"global":{"anchors":[{"anchor":"डेवलपर कंसोल","icon":"circle-play","href":"https://developer.x.com/en/portal/petition/essential/basic-info"},{"anchor":"फ़ोरम","icon":"messages","href":"https://devcommunity.x.com"},{"anchor":"GitHub","icon":"github","href":"https://github.com/xdevplatform"}]}},{"language":"ja","pages":[{"title":"ja","href":"/ja/xdks/python/reference/xdk.direct_messages"}]},{"language":"ko","pages":[{"title":"ko","href":"/ko/xdks/python/reference/xdk.direct_messages"}]}]},"basePath":"","title":"DirectMessagesClient - X","buildId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","deploymentId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","dynamics":[],"chunks":[]}