Este módulo proporciona funcionalidad de autenticación OAuth 1.0a para flujos de autorización seguros. Incluye generación de tokens de solicitud, generación de URL de autorización, intercambio de tokens de acceso y generación de firmas OAuth 1.0a.
class xdk.oauth1_auth.OAuth1
Controlador de autenticación OAuth1 para X API.
Parámetros
str
str
str
str or None
predeterminado:"None"
str or None
predeterminado:"None"
__init__
Inicializa la autenticación OAuth1.
Parámetros
str
API Key (Consumer Key).
str
API Secret (Consumer Secret).
str
URL de retorno para el flujo de OAuth.
str or None
predeterminado:"None"
Access Token (si ya se ha obtenido).
str or None
predeterminado:"None"
Access Token Secret (si ya se ha obtenido).
build_request_header
Crea el encabezado de autorización OAuth1 para las solicitudes a la API.
Parámetros
str
Método HTTP (GET, POST, etc.).
str
URL de la solicitud (puede incluir parámetros de consulta).
str
predeterminado:"''"
Cuerpo de la solicitud (cadena con codificación de formulario o vacío).
Devuelve
str
get_access_token
Intercambia el verificador por un token de acceso.
Parámetros
str
Código de verificación OAuth del callback o PIN.
Devuelve
OAuth1AccessToken
get_authorization_url
Obtén la URL de autorización para el flujo de OAuth1.
Parámetros
bool
predeterminado:"False"
Indica si se debe utilizar el flujo «Iniciar sesión con X».
Devuelve
str
get_request_token
Obtiene un token de solicitud para iniciar el flujo de OAuth1.
:returns: Devuelve un token de solicitud con oauth_token y oauth_token_secret.
:rtype: OAuth1RequestToken
Valor devuelto
OAuth1RequestToken
start_oauth_flow
Método práctico para iniciar el flujo de OAuth 1.0.
Parámetros
bool
predeterminado:"False"
Indica si se debe usar el flujo de «Iniciar sesión con X».
Devuelve
str
class xdk.oauth1_auth.OAuth1AccessToken
Respuesta del token de acceso de OAuth1.
Parámetros
str
str
__init__
Inicializa el token de acceso OAuth1.
Parámetros
str
El token de acceso.
str
El secreto del token de acceso.
class xdk.oauth1_auth.OAuth1RequestToken
Respuesta del token de solicitud de OAuth1.
Parámetros
str
str
__init__
Inicializa el token de solicitud para OAuth1.
Parámetros
str
El token OAuth.
str
El secreto del token OAuth.
{"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":"es/xdks/python/reference/xdk.oauth1_auth","slug":"/es/xdks/python/reference/xdk.oauth1_auth","pageMetadata":{"title":"oauth1_auth","sidebarTitle":"oauth1_auth","description":null,"href":"/es/xdks/python/reference/xdk.oauth1_auth","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={code:`code`,p:`p`,..._provideComponents(),...props.components},{Heading,ParamField}=_components;if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Este módulo proporciona funcionalidad de autenticación OAuth 1.0a para flujos de autorización seguros. Incluye generación de tokens de solicitud, generación de URL de autorización, intercambio de tokens de acceso y generación de firmas OAuth 1.0a.`}),`\n`,_jsx(`div`,{id:`class-xdkoauth1_authoauth1`,children:_jsx(Heading,{level:`3`,id:`class-xdk-oauth1_auth-oauth1`,children:_jsx(_components.code,{children:`class xdk.oauth1_auth.OAuth1`})})}),`\n`,_jsx(_components.p,{children:`Controlador de autenticación OAuth1 para X API.`}),`\n`,_jsx(`div`,{id:`parameters`,children:_jsx(Heading,{level:`4`,id:`parámetros`,children:`Parámetros`})}),`\n`,_jsx(ParamField,{path:`path.api_key`,type:`str`,id:`param-path-api-key`}),`\n`,_jsx(ParamField,{path:`path.api_secret`,type:`str`,id:`param-path-api-secret`}),`\n`,_jsx(ParamField,{path:`path.callback`,type:`str`,id:`param-path-callback`}),`\n`,_jsx(ParamField,{path:`path.access_token`,type:`str or None`,default:`None`,id:`param-path-access-token`}),`\n`,_jsx(ParamField,{path:`path.access_token_secret`,type:`str or None`,default:`None`,id:`param-path-access-token-secret`}),`\n`,_jsx(`div`,{id:`__init__`,children:_jsx(Heading,{level:`3`,id:`__init__`,children:_jsx(_components.code,{children:`__init__`})})}),`\n`,_jsx(_components.p,{children:`Inicializa la autenticación OAuth1.`}),`\n`,_jsx(`div`,{id:`parameters`,children:_jsx(Heading,{level:`4`,id:`parámetros-2`,children:`Parámetros`})}),`\n`,_jsx(ParamField,{path:`path.api_key`,type:`str`,id:`param-path-api-key-1`,children:_jsx(_components.p,{children:`API Key (Consumer Key).`})}),`\n`,_jsx(ParamField,{path:`path.api_secret`,type:`str`,id:`param-path-api-secret-1`,children:_jsx(_components.p,{children:`API Secret (Consumer Secret).`})}),`\n`,_jsx(ParamField,{path:`path.callback`,type:`str`,id:`param-path-callback-1`,children:_jsx(_components.p,{children:`URL de retorno para el flujo de OAuth.`})}),`\n`,_jsx(ParamField,{path:`path.access_token`,type:`str or None`,default:`None`,id:`param-path-access-token-1`,children:_jsx(_components.p,{children:`Access Token (si ya se ha obtenido).`})}),`\n`,_jsx(ParamField,{path:`path.access_token_secret`,type:`str or None`,default:`None`,id:`param-path-access-token-secret-1`,children:_jsx(_components.p,{children:`Access Token Secret (si ya se ha obtenido).`})}),`\n`,_jsx(`div`,{id:`build_request_header`,children:_jsx(Heading,{level:`3`,id:`build_request_header`,children:_jsx(_components.code,{children:`build_request_header`})})}),`\n`,_jsx(_components.p,{children:`Crea el encabezado de autorización OAuth1 para las solicitudes a la API.`}),`\n`,_jsx(`div`,{id:`parameters`,children:_jsx(Heading,{level:`4`,id:`parámetros-3`,children:`Parámetros`})}),`\n`,_jsx(ParamField,{path:`path.method`,type:`str`,id:`param-path-method`,children:_jsx(_components.p,{children:`Método HTTP (GET, POST, etc.).`})}),`\n`,_jsx(ParamField,{path:`path.url`,type:`str`,id:`param-path-url`,children:_jsx(_components.p,{children:`URL de la solicitud (puede incluir parámetros de consulta).`})}),`\n`,_jsx(ParamField,{path:`body.body`,type:`str`,default:`''`,id:`param-body-body`,children:_jsx(_components.p,{children:`Cuerpo de la solicitud (cadena con codificación de formulario o vacío).`})}),`\n`,_jsx(Heading,{level:`4`,id:`devuelve`,children:`Devuelve`}),`\n`,_jsx(_components.p,{children:_jsx(_components.code,{children:`str`})}),`\n`,_jsx(`div`,{id:`get_access_token`,children:_jsx(Heading,{level:`3`,id:`get_access_token`,children:_jsx(_components.code,{children:`get_access_token`})})}),`\n`,_jsx(_components.p,{children:`Intercambia el verificador por un token de acceso.`}),`\n`,_jsx(`div`,{id:`parameters`,children:_jsx(Heading,{level:`4`,id:`parámetros-4`,children:`Parámetros`})}),`\n`,_jsx(ParamField,{path:`path.verifier`,type:`str`,id:`param-path-verifier`,children:_jsx(_components.p,{children:`Código de verificación OAuth del callback o PIN.`})}),`\n`,_jsx(Heading,{level:`4`,id:`devuelve-2`,children:`Devuelve`}),`\n`,_jsx(_components.p,{children:_jsx(_components.code,{children:`OAuth1AccessToken`})}),`\n`,_jsx(`div`,{id:`get_authorization_url`,children:_jsx(Heading,{level:`3`,id:`get_authorization_url`,children:_jsx(_components.code,{children:`get_authorization_url`})})}),`\n`,_jsx(_components.p,{children:`Obtén la URL de autorización para el flujo de OAuth1.`}),`\n`,_jsx(`div`,{id:`parameters`,children:_jsx(Heading,{level:`4`,id:`parámetros-5`,children:`Parámetros`})}),`\n`,_jsx(ParamField,{path:`path.login_with_x`,type:`bool`,default:`False`,id:`param-path-login-with-x`,children:_jsx(_components.p,{children:`Indica si se debe utilizar el flujo «Iniciar sesión con X».`})}),`\n`,_jsx(Heading,{level:`4`,id:`devuelve-3`,children:`Devuelve`}),`\n`,_jsx(_components.p,{children:_jsx(_components.code,{children:`str`})}),`\n`,_jsx(`div`,{id:`get_request_token`,children:_jsx(Heading,{level:`3`,id:`get_request_token`,children:_jsx(_components.code,{children:`get_request_token`})})}),`\n`,_jsx(_components.p,{children:`Obtiene un token de solicitud para iniciar el flujo de OAuth1.\n:returns: Devuelve un token de solicitud con oauth_token y oauth_token_secret.\n:rtype: OAuth1RequestToken`}),`\n`,_jsx(`div`,{id:`returns`,children:_jsx(Heading,{level:`4`,id:`valor-devuelto`,children:`Valor devuelto`})}),`\n`,_jsx(_components.p,{children:_jsx(_components.code,{children:`OAuth1RequestToken`})}),`\n`,_jsx(`div`,{id:`start_oauth_flow`,children:_jsx(Heading,{level:`3`,id:`start_oauth_flow`,children:_jsx(_components.code,{children:`start_oauth_flow`})})}),`\n`,_jsx(_components.p,{children:`Método práctico para iniciar el flujo de OAuth 1.0.`}),`\n`,_jsx(`div`,{id:`parameters`,children:_jsx(Heading,{level:`4`,id:`parámetros-6`,children:`Parámetros`})}),`\n`,_jsx(ParamField,{path:`path.login_with_x`,type:`bool`,default:`False`,id:`param-path-login-with-x-1`,children:_jsx(_components.p,{children:`Indica si se debe usar el flujo de «Iniciar sesión con X».`})}),`\n`,_jsx(Heading,{level:`4`,id:`devuelve-4`,children:`Devuelve`}),`\n`,_jsx(_components.p,{children:_jsx(_components.code,{children:`str`})}),`\n`,_jsx(`div`,{id:`class-xdkoauth1_authoauth1accesstoken`,children:_jsx(Heading,{level:`3`,id:`class-xdk-oauth1_auth-oauth1accesstoken`,children:_jsx(_components.code,{children:`class xdk.oauth1_auth.OAuth1AccessToken`})})}),`\n`,_jsx(_components.p,{children:`Respuesta del token de acceso de OAuth1.`}),`\n`,_jsx(`div`,{id:`parameters`,children:_jsx(Heading,{level:`4`,id:`parámetros-7`,children:`Parámetros`})}),`\n`,_jsx(ParamField,{path:`path.access_token`,type:`str`,id:`param-path-access-token-2`}),`\n`,_jsx(ParamField,{path:`path.access_token_secret`,type:`str`,id:`param-path-access-token-secret-2`}),`\n`,_jsx(`div`,{id:`__init__`,children:_jsx(Heading,{level:`3`,id:`__init__-2`,children:_jsx(_components.code,{children:`__init__`})})}),`\n`,_jsx(_components.p,{children:`Inicializa el token de acceso OAuth1.`}),`\n`,_jsx(`div`,{id:`parameters`,children:_jsx(Heading,{level:`4`,id:`parámetros-8`,children:`Parámetros`})}),`\n`,_jsx(ParamField,{path:`path.access_token`,type:`str`,id:`param-path-access-token-3`,children:_jsx(_components.p,{children:`El token de acceso.`})}),`\n`,_jsx(ParamField,{path:`path.access_token_secret`,type:`str`,id:`param-path-access-token-secret-3`,children:_jsx(_components.p,{children:`El secreto del token de acceso.`})}),`\n`,_jsx(`div`,{id:`class-xdkoauth1_authoauth1requesttoken`,children:_jsx(Heading,{level:`3`,id:`class-xdk-oauth1_auth-oauth1requesttoken`,children:_jsx(_components.code,{children:`class xdk.oauth1_auth.OAuth1RequestToken`})})}),`\n`,_jsx(_components.p,{children:`Respuesta del token de solicitud de OAuth1.`}),`\n`,_jsx(`div`,{id:`parameters`,children:_jsx(Heading,{level:`4`,id:`parámetros-9`,children:`Parámetros`})}),`\n`,_jsx(ParamField,{path:`path.oauth_token`,type:`str`,id:`param-path-oauth-token`}),`\n`,_jsx(ParamField,{path:`path.oauth_token_secret`,type:`str`,id:`param-path-oauth-token-secret`}),`\n`,_jsx(`div`,{id:`__init__`,children:_jsx(Heading,{level:`3`,id:`__init__-3`,children:_jsx(_components.code,{children:`__init__`})})}),`\n`,_jsx(_components.p,{children:`Inicializa el token de solicitud para OAuth1.`}),`\n`,_jsx(`div`,{id:`parameters`,children:_jsx(Heading,{level:`4`,id:`parámetros-10`,children:`Parámetros`})}),`\n`,_jsx(ParamField,{path:`path.oauth_token`,type:`str`,id:`param-path-oauth-token-1`,children:_jsx(_components.p,{children:`El token OAuth.`})}),`\n`,_jsx(ParamField,{path:`path.oauth_token_secret`,type:`str`,id:`param-path-oauth-token-secret-1`,children:_jsx(_components.p,{children:`El secreto del token OAuth.`})})]})}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":"oauth1_auth","sidebarTitle":"oauth1_auth","description":null,"href":"/es/xdks/python/reference/xdk.oauth1_auth","hidden":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"class xdk.oauth1_auth.OAuth1","slug":"class-xdk-oauth1_auth-oauth1","depth":3,"children":[]},{"title":"Parámetros","slug":"parámetros","depth":4,"children":[]},{"title":"__init__","slug":"__init__","depth":3,"children":[]},{"title":"Parámetros","slug":"parámetros-2","depth":4,"children":[]},{"title":"build_request_header","slug":"build_request_header","depth":3,"children":[]},{"title":"Parámetros","slug":"parámetros-3","depth":4,"children":[]},{"title":"Devuelve","slug":"devuelve","depth":4,"children":[]},{"title":"get_access_token","slug":"get_access_token","depth":3,"children":[]},{"title":"Parámetros","slug":"parámetros-4","depth":4,"children":[]},{"title":"Devuelve","slug":"devuelve-2","depth":4,"children":[]},{"title":"get_authorization_url","slug":"get_authorization_url","depth":3,"children":[]},{"title":"Parámetros","slug":"parámetros-5","depth":4,"children":[]},{"title":"Devuelve","slug":"devuelve-3","depth":4,"children":[]},{"title":"get_request_token","slug":"get_request_token","depth":3,"children":[]},{"title":"Valor devuelto","slug":"valor-devuelto","depth":4,"children":[]},{"title":"start_oauth_flow","slug":"start_oauth_flow","depth":3,"children":[]},{"title":"Parámetros","slug":"parámetros-6","depth":4,"children":[]},{"title":"Devuelve","slug":"devuelve-4","depth":4,"children":[]},{"title":"class xdk.oauth1_auth.OAuth1AccessToken","slug":"class-xdk-oauth1_auth-oauth1accesstoken","depth":3,"children":[]},{"title":"Parámetros","slug":"parámetros-7","depth":4,"children":[]},{"title":"__init__","slug":"__init__-2","depth":3,"children":[]},{"title":"Parámetros","slug":"parámetros-8","depth":4,"children":[]},{"title":"class xdk.oauth1_auth.OAuth1RequestToken","slug":"class-xdk-oauth1_auth-oauth1requesttoken","depth":3,"children":[]},{"title":"Parámetros","slug":"parámetros-9","depth":4,"children":[]},{"title":"__init__","slug":"__init__-3","depth":3,"children":[]},{"title":"Parámetros","slug":"parámetros-10","depth":4,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/generaltranslation/f67e695317871503/widgets.js","/_mintlify/custom/generaltranslation/dd4721d49d6e0698/sliders.js"],"subdomain":"generaltranslation","siteName":"X","title":"oauth1_auth - X","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/xdks/python/reference/xdk.oauth1_auth","matchLevel":1,"hidden":true},"es":{"href":"/es/xdks/python/reference/xdk.oauth1_auth","matchLevel":0},"fr":{"href":"/fr/xdks/python/reference/xdk.oauth1_auth","matchLevel":1,"hidden":true},"hi":{"href":"/hi/xdks/python/reference/xdk.oauth1_auth","matchLevel":1,"hidden":true},"ja":{"href":"/ja/xdks/python/reference/xdk.oauth1_auth","matchLevel":1,"hidden":true},"ko":{"href":"/ko/xdks/python/reference/xdk.oauth1_auth","matchLevel":1,"hidden":true}}},"lastModified":"2026-04-02T03:58:02.613Z","originalFileLocation":"es/xdks/python/reference/xdk.oauth1_auth.mdx","locale":"es"},"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=\"oauth1_auth - 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/es/xdks/python/reference/xdk.oauth1_auth\">\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=Autenticaci%C3%B3n+OAuth+1.0a\u0026amp;title=oauth1_auth\u0026amp;theme=3199bd2c292b5ac8dc3f7441\u0026amp;signature=111a3496dfe0e91a0e959339edde14bcee037a2cb8e80f2398262385267dbde9\">\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=\"oauth1_auth - 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=Autenticaci%C3%B3n+OAuth+1.0a\u0026amp;title=oauth1_auth\u0026amp;theme=3199bd2c292b5ac8dc3f7441\u0026amp;signature=111a3496dfe0e91a0e959339edde14bcee037a2cb8e80f2398262385267dbde9\">\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/es/xdks/python/reference/xdk.oauth1_auth\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/es/xdks/python/reference/xdk.oauth1_auth.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"es\" href=\"https://docs.x.com/es/xdks/python/reference/xdk.oauth1_auth\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.x.com/xdks/python/reference/xdk.oauth1_auth\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"fr\" href=\"https://docs.x.com/fr/xdks/python/reference/xdk.oauth1_auth\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"hi\" href=\"https://docs.x.com/hi/xdks/python/reference/xdk.oauth1_auth\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ja\" href=\"https://docs.x.com/ja/xdks/python/reference/xdk.oauth1_auth\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ko\" href=\"https://docs.x.com/ko/xdks/python/reference/xdk.oauth1_auth\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.x.com/xdks/python/reference/xdk.oauth1_auth\">\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/es/xdks/python/reference/xdk.oauth1_auth#webpage\",\"url\":\"https://docs.x.com/es/xdks/python/reference/xdk.oauth1_auth\",\"name\":\"oauth1_auth\",\"dateModified\":\"2026-04-02T03:58:02.613Z\",\"isPartOf\":{\"@id\":\"https://docs.x.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.x.com/es/xdks/python/reference/xdk.oauth1_auth#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.x.com/es/xdks/python/reference/xdk.oauth1_auth#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Referencia de la API\",\"item\":\"https://docs.x.com/es/xdks/python/reference/modules\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Principal\",\"item\":\"https://docs.x.com/es/xdks/python/reference/xdk.account_activity\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"oauth1_auth\",\"item\":\"https://docs.x.com/es/xdks/python/reference/xdk.oauth1_auth\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.x.com/es/xdks/python/reference/xdk.oauth1_auth#article\",\"headline\":\"oauth1_auth\",\"name\":\"oauth1_auth\",\"url\":\"https://docs.x.com/es/xdks/python/reference/xdk.oauth1_auth\",\"mainEntityOfPage\":{\"@id\":\"https://docs.x.com/es/xdks/python/reference/xdk.oauth1_auth#webpage\"},\"dateModified\":\"2026-04-02T03:58:02.613Z\",\"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":"/es/xdks/python/reference/xdk.oauth1_auth.md","siteName":"X","nav":{"global":null,"languages":[{"language":"en","pages":[{"title":"en","href":"/xdks/python/reference/xdk.oauth1_auth"}]},{"language":"es","tabs":[{"tab":"Inicio","pages":[{"title":"Inicio","href":"/es/overview"}]},{"tab":"X API","pages":[{"title":"X API","href":"/es/x-api/introduction"}]},{"tab":"X Ads API","pages":[{"title":"X Ads API","href":"/es/x-ads-api/introduction"}]},{"tab":"XDKs","pages":[{"title":"XDKs","href":"/es/xdks/overview"}]},{"tab":"Tutoriales","pages":[{"title":"Tutoriales","href":"/es/tutorials/explore-a-users-posts"}]},{"tab":"Casos de uso","pages":[{"title":"Casos de uso","href":"/es/use-cases/build-for-business"}]},{"tab":"Casos de éxito","pages":[{"title":"Casos de éxito","href":"/es/success-stories"}]},{"tab":"Estado","pages":[{"title":"Estado","href":"/es/status"}]},{"tab":"Registro de cambios","pages":[{"title":"Registro de cambios","href":"/es/changelog"}]},{"tab":"SDK de Python","hidden":true,"pages":[{"title":"XDK de Python","sidebarTitle":"Descripción general","description":null,"href":"/es/xdks/python/overview"},{"title":"Instalación","sidebarTitle":"Instalación","description":null,"href":"/es/xdks/python/install"},{"title":"Inicio rápido","sidebarTitle":"Inicio rápido","description":null,"href":"/es/xdks/python/quickstart"},{"title":"Autenticación","sidebarTitle":"Autenticación","description":null,"href":"/es/xdks/python/authentication"},{"title":"Paginación","sidebarTitle":"Paginación","description":null,"href":"/es/xdks/python/pagination"},{"title":"Transmisión","sidebarTitle":"Transmisión","description":null,"href":"/es/xdks/python/streaming"},{"group":"Referencia de la API","pages":[{"title":"xdk","sidebarTitle":"xdk","description":null,"href":"/es/xdks/python/reference/modules"},{"group":"Clientes","pages":[{"group":"Actividad de la cuenta","pages":[{"title":"AccountActivityClient","sidebarTitle":"AccountActivityClient","description":null,"href":"/es/xdks/python/reference/xdk.account_activity.client"}]},{"group":"Actividad","pages":[{"title":"ActivityClient","sidebarTitle":"ActivityClient","description":null,"href":"/es/xdks/python/reference/xdk.activity.client"}]},{"group":"Client","pages":[{"title":"Client","sidebarTitle":"Client","description":null,"href":"/es/xdks/python/reference/xdk.client"}]},{"group":"Comunidades","pages":[{"title":"CommunitiesClient","sidebarTitle":"CommunitiesClient","description":null,"href":"/es/xdks/python/reference/xdk.communities.client"}]},{"group":"Notas de la comunidad","pages":[{"title":"CommunityNotesClient","sidebarTitle":"CommunityNotesClient","description":null,"href":"/es/xdks/python/reference/xdk.community_notes.client"}]},{"group":"Cumplimiento","pages":[{"title":"ComplianceClient","sidebarTitle":"ComplianceClient","description":null,"href":"/es/xdks/python/reference/xdk.compliance.client"}]},{"group":"Conexiones","pages":[{"title":"ConnectionsClient","sidebarTitle":"ConnectionsClient","description":null,"href":"/es/xdks/python/reference/xdk.connections.client"}]},{"group":"Mensajes directos","pages":[{"title":"DirectMessagesClient","sidebarTitle":"DirectMessagesClient","description":null,"href":"/es/xdks/python/reference/xdk.direct_messages.client"}]},{"group":"General","pages":[{"title":"GeneralClient","sidebarTitle":"GeneralClient","description":null,"href":"/es/xdks/python/reference/xdk.general.client"}]},{"group":"Listas","pages":[{"title":"ListsClient","sidebarTitle":"ListsClient","description":null,"href":"/es/xdks/python/reference/xdk.lists.client"}]},{"group":"Medios","pages":[{"title":"MediaClient","sidebarTitle":"MediaClient","description":null,"href":"/es/xdks/python/reference/xdk.media.client"}]},{"group":"Noticias","pages":[{"title":"NewsClient","sidebarTitle":"NewsClient","description":null,"href":"/es/xdks/python/reference/xdk.news.client"}]},{"group":"Publicaciones","pages":[{"title":"PostsClient","sidebarTitle":"PostsClient","description":null,"href":"/es/xdks/python/reference/xdk.posts.client"}]},{"group":"Espacios","pages":[{"title":"SpacesClient","sidebarTitle":"SpacesClient","description":null,"href":"/es/xdks/python/reference/xdk.spaces.client"}]},{"group":"Transmisión","pages":[{"title":"StreamClient","sidebarTitle":"StreamClient","description":null,"href":"/es/xdks/python/reference/xdk.stream.client"}]},{"group":"Tendencias","pages":[{"title":"TrendsClient","sidebarTitle":"TrendsClient","description":null,"href":"/es/xdks/python/reference/xdk.trends.client"}]},{"group":"Uso","pages":[{"title":"UsageClient","sidebarTitle":"UsageClient","description":null,"href":"/es/xdks/python/reference/xdk.usage.client"}]},{"group":"Usuarios","pages":[{"title":"UsersClient","sidebarTitle":"UsersClient","description":null,"href":"/es/xdks/python/reference/xdk.users.client"}]},{"group":"Webhooks","pages":[{"title":"WebhooksClient","sidebarTitle":"WebhooksClient","description":null,"href":"/es/xdks/python/reference/xdk.webhooks.client"}]}]},{"group":"Modelos","pages":[{"group":"Actividad de la cuenta","pages":[{"title":"Account_activity.Models","sidebarTitle":"Account_activity.Models","description":null,"href":"/es/xdks/python/reference/xdk.account_activity.models"}]},{"group":"Actividad","pages":[{"title":"Activity.Models","sidebarTitle":"Activity.Models","description":null,"href":"/es/xdks/python/reference/xdk.activity.models"}]},{"group":"Comunidades","pages":[{"title":"Communities.Models","sidebarTitle":"Communities.Models","description":null,"href":"/es/xdks/python/reference/xdk.communities.models"}]},{"group":"Notas de la comunidad","pages":[{"title":"Community_notes.Models","sidebarTitle":"Community_notes.Models","description":null,"href":"/es/xdks/python/reference/xdk.community_notes.models"}]},{"group":"Cumplimiento","pages":[{"title":"Compliance.Models","sidebarTitle":"Compliance.Models","description":null,"href":"/es/xdks/python/reference/xdk.compliance.models"}]},{"group":"Conexiones","pages":[{"title":"Connections.Models","sidebarTitle":"Connections.Models","description":null,"href":"/es/xdks/python/reference/xdk.connections.models"}]},{"group":"Mensajes directos","pages":[{"title":"Direct_messages.Models","sidebarTitle":"Direct_messages.Models","description":null,"href":"/es/xdks/python/reference/xdk.direct_messages.models"}]},{"group":"General","pages":[{"title":"General.Models","sidebarTitle":"General.Models","description":null,"href":"/es/xdks/python/reference/xdk.general.models"}]},{"group":"Listas","pages":[{"title":"Lists.Models","sidebarTitle":"Lists.Models","description":null,"href":"/es/xdks/python/reference/xdk.lists.models"}]},{"group":"Medios","pages":[{"title":"Media.Models","sidebarTitle":"Media.Models","description":null,"href":"/es/xdks/python/reference/xdk.media.models"}]},{"group":"Noticias","pages":[{"title":"News.Models","sidebarTitle":"News.Models","description":null,"href":"/es/xdks/python/reference/xdk.news.models"}]},{"group":"Publicaciones","pages":[{"title":"Posts.Models","sidebarTitle":"Posts.Models","description":null,"href":"/es/xdks/python/reference/xdk.posts.models"}]},{"group":"Spaces","pages":[{"title":"Spaces.Models","sidebarTitle":"Spaces.Models","description":null,"href":"/es/xdks/python/reference/xdk.spaces.models"}]},{"group":"Flujos","pages":[{"title":"Stream.Models","sidebarTitle":"Stream.Models","description":null,"href":"/es/xdks/python/reference/xdk.stream.models"}]},{"group":"Tendencias","pages":[{"title":"Trends.Models","sidebarTitle":"Trends.Models","description":null,"href":"/es/xdks/python/reference/xdk.trends.models"}]},{"group":"Uso","pages":[{"title":"Usage.Models","sidebarTitle":"Usage.Models","description":null,"href":"/es/xdks/python/reference/xdk.usage.models"}]},{"group":"Usuarios","pages":[{"title":"Users.Models","sidebarTitle":"Users.Models","description":null,"href":"/es/xdks/python/reference/xdk.users.models"}]},{"group":"Webhooks","pages":[{"title":"Webhooks.Models","sidebarTitle":"Webhooks.Models","description":null,"href":"/es/xdks/python/reference/xdk.webhooks.models"}]}]},{"group":"Principal","pages":[{"group":"Actividad de la cuenta","pages":[{"title":"AccountActivityClient","sidebarTitle":"AccountActivityClient","description":null,"href":"/es/xdks/python/reference/xdk.account_activity"}]},{"group":"Actividad","pages":[{"title":"ActivityClient","sidebarTitle":"ActivityClient","description":null,"href":"/es/xdks/python/reference/xdk.activity"}]},{"group":"Comunidades","pages":[{"title":"CommunitiesClient","sidebarTitle":"CommunitiesClient","description":null,"href":"/es/xdks/python/reference/xdk.communities"}]},{"group":"Notas de la comunidad","pages":[{"title":"CommunityNotesClient","sidebarTitle":"CommunityNotesClient","description":null,"href":"/es/xdks/python/reference/xdk.community_notes"}]},{"group":"Cumplimiento","pages":[{"title":"ComplianceClient","sidebarTitle":"ComplianceClient","description":null,"href":"/es/xdks/python/reference/xdk.compliance"}]},{"group":"Conexiones","pages":[{"title":"ConnectionsClient","sidebarTitle":"ConnectionsClient","description":null,"href":"/es/xdks/python/reference/xdk.connections"}]},{"group":"Mensajes directos","pages":[{"title":"DirectMessagesClient","sidebarTitle":"DirectMessagesClient","description":null,"href":"/es/xdks/python/reference/xdk.direct_messages"}]},{"group":"General","pages":[{"title":"GeneralClient","sidebarTitle":"GeneralClient","description":null,"href":"/es/xdks/python/reference/xdk.general"}]},{"group":"Listas","pages":[{"title":"ListsClient","sidebarTitle":"ListsClient","description":null,"href":"/es/xdks/python/reference/xdk.lists"}]},{"group":"Medios","pages":[{"title":"MediaClient","sidebarTitle":"MediaClient","description":null,"href":"/es/xdks/python/reference/xdk.media"}]},{"group":"Noticias","pages":[{"title":"NewsClient","sidebarTitle":"NewsClient","description":null,"href":"/es/xdks/python/reference/xdk.news"}]},{"group":"Autenticación OAuth 1.0a","pages":[{"title":"oauth1_auth","sidebarTitle":"oauth1_auth","href":"/es/xdks/python/reference/xdk.oauth1_auth"}]},{"group":"Autenticación OAuth 2.0","pages":[{"title":"OAuth2PKCEAuth","sidebarTitle":"OAuth2PKCEAuth","description":null,"href":"/es/xdks/python/reference/xdk.oauth2_auth"}]},{"group":"Paginador","pages":[{"title":"paginator","sidebarTitle":"paginator","description":null,"href":"/es/xdks/python/reference/xdk.paginator"}]},{"group":"Publicaciones","pages":[{"title":"PostsClient","sidebarTitle":"PostsClient","description":null,"href":"/es/xdks/python/reference/xdk.posts"}]},{"group":"Spaces","pages":[{"title":"SpacesClient","sidebarTitle":"SpacesClient","description":null,"href":"/es/xdks/python/reference/xdk.spaces"}]},{"group":"Flujo","pages":[{"title":"StreamClient","sidebarTitle":"StreamClient","description":null,"href":"/es/xdks/python/reference/xdk.stream"}]},{"group":"Streaming","pages":[{"title":"transmisión en tiempo real","sidebarTitle":"transmisión en tiempo real","description":null,"href":"/es/xdks/python/reference/xdk.streaming"}]},{"group":"Tendencias","pages":[{"title":"TrendsClient","sidebarTitle":"TrendsClient","description":null,"href":"/es/xdks/python/reference/xdk.trends"}]},{"group":"Uso","pages":[{"title":"UsageClient","sidebarTitle":"UsageClient","description":null,"href":"/es/xdks/python/reference/xdk.usage"}]},{"group":"Usuarios","pages":[{"title":"UsersClient","sidebarTitle":"UsersClient","description":null,"href":"/es/xdks/python/reference/xdk.users"}]},{"group":"Webhooks","pages":[{"title":"WebhooksClient","sidebarTitle":"WebhooksClient","description":null,"href":"/es/xdks/python/reference/xdk.webhooks"}]},{"group":"xdk","pages":[{"title":"Client","sidebarTitle":"Client","description":null,"href":"/es/xdks/python/reference/xdk"}]}]}]}]},{"tab":"SDK de TypeScript","hidden":true,"pages":[{"title":"SDK de TypeScript","href":"/es/xdks/typescript/overview"}]}],"global":{"anchors":[{"anchor":"Consola de desarrollador","icon":"circle-play","href":"https://developer.x.com/en/portal/petition/essential/basic-info"},{"anchor":"Foros","icon":"messages","href":"https://devcommunity.x.com"},{"anchor":"GitHub","icon":"github","href":"https://github.com/xdevplatform"}]}},{"language":"fr","pages":[{"title":"fr","href":"/fr/xdks/python/reference/xdk.oauth1_auth"}]},{"language":"hi","pages":[{"title":"hi","href":"/hi/xdks/python/reference/xdk.oauth1_auth"}]},{"language":"ja","pages":[{"title":"ja","href":"/ja/xdks/python/reference/xdk.oauth1_auth"}]},{"language":"ko","pages":[{"title":"ko","href":"/ko/xdks/python/reference/xdk.oauth1_auth"}]}]},"basePath":"","title":"oauth1_auth - X","buildId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","deploymentId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","dynamics":[],"chunks":[]}