Verifica que cada solicitud de webhook provenga realmente de Firecrawl comprobando su firma HMAC-SHA256. Esto evita que los atacantes falsifiquen la carga útil y te permite confiar en los datos antes de actuar en consecuencia.
Tu secreto de webhook está disponible en la pestaña Advanced de la configuración de tu cuenta. Cada cuenta tiene un secreto único que se utiliza para firmar todas las solicitudes de webhook.
Mantén tu secreto de webhook seguro y nunca lo expongas públicamente. Si crees que tu secreto se ha visto comprometido, regénéralo de inmediato desde la configuración de tu cuenta.
import crypto from 'crypto';import express from 'express';const app = express();// Usa el analizador de cuerpo en bruto para verificar la firmaapp.use('/webhook/firecrawl', express.raw({ type: 'application/json' }));app.post('/webhook/firecrawl', (req, res) => { const signature = req.get('X-Firecrawl-Signature'); const webhookSecret = process.env.FIRECRAWL_WEBHOOK_SECRET; if (!signature || !webhookSecret) { return res.status(401).send('No autorizado'); } // Extrae el hash del encabezado de la firma const [algorithm, hash] = signature.split('='); if (algorithm !== 'sha256') { return res.status(401).send('Algoritmo de firma no válido'); } // Calcula la firma esperada const expectedSignature = crypto .createHmac('sha256', webhookSecret) .update(req.body) .digest('hex'); // Verifica la firma usando una comparación segura contra ataques de temporización if (!crypto.timingSafeEqual(Buffer.from(hash, 'hex'), Buffer.from(expectedSignature, 'hex'))) { return res.status(401).send('Firma no válida'); } // Analiza y procesa el webhook verificado const event = JSON.parse(req.body); console.log('Webhook de Firecrawl verificado:', event); res.status(200).send('ok');});app.listen(3000, () => console.log('Escuchando en el puerto 3000'));
import hmacimport hashlibfrom flask import Flask, request, abortapp = Flask(__name__)WEBHOOK_SECRET = 'your-webhook-secret-here' # Consíguelo en el panel de Firecrawl@app.post('/webhook/firecrawl')def webhook(): signature = request.headers.get('X-Firecrawl-Signature') if not signature: abort(401, 'Falta el encabezado de la firma') # Extrae el hash del encabezado de la firma try: algorithm, hash_value = signature.split('=', 1) if algorithm != 'sha256': abort(401, 'Algoritmo de firma inválido') except ValueError: abort(401, 'Formato de firma inválido') # Calcula la firma esperada expected_signature = hmac.new( WEBHOOK_SECRET.encode('utf-8'), request.data, hashlib.sha256 ).hexdigest() # Verifica la firma usando una comparación segura frente a ataques de tiempo if not hmac.compare_digest(hash_value, expected_signature): abort(401, 'Firma inválida') # Analiza y procesa el webhook verificado event = request.get_json(force=True) print('Webhook de Firecrawl verificado:', event) return 'ok', 200if __name__ == '__main__': app.run(port=3000)
Verifica cada solicitud. Comprueba siempre la firma antes de procesar una carga útil de webhook. Rechaza cualquier solicitud que no supere la verificación con un código de estado 401.
Usa comparaciones seguras en tiempo constante. Las comparaciones de cadenas estándar pueden filtrar información por temporización. Usa crypto.timingSafeEqual() en Node.js o hmac.compare_digest() en Python.
Expón tu endpoint a través de HTTPS. Esto garantiza que las cargas útiles de webhook estén cifradas durante la transmisión.
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"Firecrawl Docs","colors":{"primary":"#000","light":"#fff","dark":"#000"},"logo":{"light":"https://mintcdn.com/firecrawl/iilnMwCX-8eR1yOO/logo/logo.png?fit=max\u0026auto=format\u0026n=iilnMwCX-8eR1yOO\u0026q=85\u0026s=c45b3c967c19a39190e76fe8e9c2ed5a","dark":"https://mintcdn.com/firecrawl/iilnMwCX-8eR1yOO/logo/logo-dark.png?fit=max\u0026auto=format\u0026n=iilnMwCX-8eR1yOO\u0026q=85\u0026s=3fee4abe033bd3c26e8ad92043a91c17","href":"https://firecrawl.dev"},"favicon":"https://mintcdn.com/firecrawl/vlKm1oZYK3oSRVTM/favicon.ico?fit=max\u0026auto=format\u0026n=vlKm1oZYK3oSRVTM\u0026q=85\u0026s=cd95e713995e71b79a2e393957f6f661","navbar":{"links":[{"href":"https://firecrawl.betteruptime.com","label":"Status"},{"href":"mailto:help@firecrawl.com","label":"Support"},{"href":"https://www.firecrawl.dev/signin?utm_source=firecrawl_docs\u0026utm_medium=nav_bar\u0026utm_content=sign_up","label":"Sign Up"}],"primary":{"type":"github","href":"https://github.com/firecrawl/firecrawl"}},"footer":{"socials":{"github":"https://github.com/firecrawl/firecrawl","linkedin":"https://www.linkedin.com/company/firecrawl","website":"https://community.firecrawl.dev/","x":"https://x.com/firecrawl"},"links":[{"header":"For AI agents","items":[{"label":"Get credentials","href":"https://docs.firecrawl.dev/ai-onboarding"},{"label":"Agent onboarding (SKILL.md)","href":"https://www.firecrawl.dev/agent-onboarding/SKILL.md"},{"label":"Agent auth (auth.md)","href":"https://www.firecrawl.dev/auth.md"},{"label":"Agent docs (llms.txt)","href":"https://docs.firecrawl.dev/llms.txt"},{"label":"Full docs (llms-full.txt)","href":"https://docs.firecrawl.dev/llms-full.txt"},{"label":"MCP server","href":"https://docs.firecrawl.dev/mcp-server"}]}]},"seo":{"metatags":{"google-site-verification":"Y83UZz1dXMKuT59lnLY_7umo6LJorqIwuP_2rFX6_eE"}},"integrations":{"ga4":{"measurementId":"G-JZJ1L5MYR1"}},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"styling":{"latex":false},"navigation":{"languages":[{"language":"en","href":"introduction"},{"language":"es","href":"es/introduction"},{"language":"fr","href":"fr/introduction"},{"language":"ja","href":"ja/introduction"},{"language":"pt-BR","href":"pt-BR/introduction"},{"language":"zh","href":"zh/introduction"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"firecrawl","hasAudioNarration":false,"actualSubdomain":"firecrawl","customDomains":["docs.firecrawl.dev"],"gitSource":{"type":"github","owner":"firecrawl","repo":"firecrawl-docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"feedback":{"thumbs":false,"edits":true,"issues":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6af20ad525a27df1d277ed8c","clientVersion":"0.0.4094","searchFilterCounts":[{"language":"en","tag":"Documentation","count":116},{"language":"es","tag":"Documentación","count":115},{"language":"fr","tag":"Documentation","count":115},{"language":"ja","tag":"ドキュメント","count":115},{"language":"pt-BR","tag":"Documentação","count":115},{"language":"zh","tag":"文档","count":115},{"language":"en","tag":"API Reference","count":68},{"language":"es","tag":"Referencia de la API","count":66},{"language":"fr","tag":"Référence de l’API","count":66},{"language":"ja","tag":"APIリファレンス","count":66},{"language":"pt-BR","tag":"Referência da API","count":66},{"language":"zh","tag":"API 参考","count":66},{"language":"en","tag":"Build with AI","count":58},{"language":"es","tag":"Crear con IA","count":58},{"language":"fr","tag":"Créer avec l’IA","count":58},{"language":"pt-BR","tag":"Desenvolva com IA","count":58},{"language":"zh","tag":"使用 AI 构建","count":58},{"language":"ja","tag":"AIで構築","count":56},{"language":"en","tag":"Quickstarts","count":33},{"language":"es","tag":"Inicios rápidos","count":33},{"language":"fr","tag":"Démarrages rapides","count":33},{"language":"ja","tag":"クイックスタート","count":33},{"language":"pt-BR","tag":"Guias de início rápido","count":33},{"language":"zh","tag":"快速入门","count":33},{"language":"en","tag":"Agent Harnesses","count":32},{"language":"es","tag":"Entornos de agentes","count":32},{"language":"fr","tag":"Intégrations pour agent","count":32},{"language":"ja","tag":"エージェントハーネス","count":32},{"language":"pt-BR","tag":"Integrações com agentes","count":32},{"language":"zh","tag":"代理工具","count":32},{"language":"en","tag":"Developer Guides","count":22},{"language":"es","tag":"Guías para desarrolladores","count":22},{"language":"fr","tag":"Guides développeur","count":22},{"language":"ja","tag":"開発者ガイド","count":22},{"language":"pt-BR","tag":"Guias para desenvolvedores","count":22},{"language":"zh","tag":"开发者指南","count":22},{"language":"en","tag":"Platforms and frameworks","count":19},{"language":"es","tag":"Plataformas y frameworks","count":19},{"language":"fr","tag":"Plateformes et frameworks","count":19},{"language":"ja","tag":"プラットフォームとフレームワーク","count":19},{"language":"pt-BR","tag":"Plataformas e frameworks","count":19},{"language":"zh","tag":"平台与框架","count":19},{"language":"es","tag":"Primeros pasos","count":16},{"language":"ja","tag":"はじめに","count":16},{"language":"pt-BR","tag":"Primeiros passos","count":16},{"language":"en","tag":"Get Started","count":14},{"language":"en","tag":"Webhook Payloads","count":13},{"language":"en","tag":"Core Endpoints","count":13},{"language":"es","tag":"Cargas útiles de webhook","count":13},{"language":"es","tag":"Endpoints principales","count":13},{"language":"fr","tag":"Démarrage rapide","count":13},{"language":"fr","tag":"Charges utiles de webhook","count":13},{"language":"fr","tag":"Points de terminaison de base","count":13},{"language":"ja","tag":"webhook ペイロード","count":13},{"language":"ja","tag":"主要エンドポイント","count":13},{"language":"pt-BR","tag":"Payloads de webhook","count":13},{"language":"pt-BR","tag":"Endpoints principais","count":13},{"language":"zh","tag":"快速开始","count":13},{"language":"zh","tag":"Webhook 负载","count":13},{"language":"zh","tag":"核心端点","count":13}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":true,"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":"llms-txt-v2","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":"instinct-self-updating-docs","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}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"li.navbar-link a[href*=\"firecrawl.dev/signin\"]{background-color:#ff4d00;color:#fff}li.navbar-link a[href*=\"firecrawl.dev/signin\"]:hover{background-color:#e64500}.dark li.navbar-link a[href*=\"firecrawl.dev/signin\"]{background-color:#ff4d00;color:#fff}.dark li.navbar-link a[href*=\"firecrawl.dev/signin\"]:hover{background-color:#e64500}li.navbar-link:has(a[href*=\"firecrawl.dev/signin\"]){order:99}nav ul li:has(a[href=\"https://github.com/firecrawl/firecrawl\"]){order:-1}#firecrawl-cta-widget{margin-top:24px}.firecrawl-cta-box{background:linear-gradient(180deg, rgba(255, 77, 0, 0.04) 0%, rgba(255, 77, 0, 0.02) 100%);border:1px solid rgba(255, 77, 0, 0.15);border-radius:12px;padding:20px}.firecrawl-cta-logo{height:20px;width:auto;object-fit:contain;margin-bottom:12px}.firecrawl-cta-logo-dark{display:none}.dark .firecrawl-cta-logo-light{display:none}.dark .firecrawl-cta-logo-dark{display:block}.firecrawl-cta-title{font-size:18px;font-weight:600;color:#111;margin:0 0 8px 0;line-height:1.3}.firecrawl-cta-description{font-size:13px;line-height:1.5;color:#666;margin:0 0 16px 0}.firecrawl-cta-description strong{color:#333}.firecrawl-cta-buttons{display:flex;flex-direction:column;gap:8px}.firecrawl-cta-btn-primary{display:block;text-align:center;background-color:#ff4d00;color:#fff!important;font-size:14px;font-weight:500;line-height:1.5;padding:10px 16px;border-radius:16px;border:none!important;box-shadow:none!important;text-decoration:none!important;transition:background-color 0.2s ease}.firecrawl-cta-btn-primary:hover{background-color:#e64500;text-decoration:none!important}.firecrawl-cta-btn-inline{display:inline-block}.firecrawl-cta-btn-secondary{display:block;text-align:center;background-color:#fff;color:#333!important;font-size:14px;font-weight:500;padding:10px 16px;border-radius:16px;border:1px solid #e5e7eb;text-decoration:none!important;transition:border-color 0.2s ease, background-color 0.2s ease}.firecrawl-cta-btn-secondary:hover{background-color:#f9fafb;border-color:#d1d5db;text-decoration:none!important}.dark .firecrawl-cta-box{background:linear-gradient(180deg, rgba(255, 77, 0, 0.08) 0%, rgba(255, 77, 0, 0.04) 100%);border-color:rgba(255, 77, 0, 0.2)}.dark .firecrawl-cta-title{color:#fff}.dark .firecrawl-cta-description{color:#aaa}.dark .firecrawl-cta-description strong{color:#ddd}.dark .firecrawl-cta-btn-primary{background-color:#ff4d00;color:#fff!important}.dark .firecrawl-cta-btn-primary:hover{background-color:#e64500}.dark .firecrawl-cta-btn-secondary{background-color:rgba(255, 255, 255, 0.05);border-color:rgba(255, 255, 255, 0.1);color:#ddd!important}.dark .firecrawl-cta-btn-secondary:hover{background-color:rgba(255, 255, 255, 0.1);border-color:rgba(255, 255, 255, 0.2)}@media (max-width: 1024px){#firecrawl-cta-widget{display:none}}#footer a.max-w-36{max-width:none;overflow:visible;text-overflow:clip;white-space:nowrap}#footer div:has(>a.max-w-36){flex-wrap:wrap}#footer a[href*=\"community.firecrawl.dev\"]>svg{-webkit-mask-image:url(\"https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/solid/comment-dots.svg\")!important;mask-image:url(\"https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/solid/comment-dots.svg\")!important}.fc-agent-first,.fc-agent-prompt{--fc-heat: #fa5d19;--fc-heat-soft: rgba(250, 93, 25, 0.04);--fc-text: #262626;--fc-text-muted: rgba(38, 38, 38, 0.56);--fc-surface: #fff;--fc-subtle: rgba(0, 0, 0, 0.02);--fc-subtle-hover: rgba(0, 0, 0, 0.06);--fc-border: #ededed;color:var(--fc-text);font-family:inherit}.dark .fc-agent-first,.dark .fc-agent-prompt{--fc-heat-soft: rgba(250, 93, 25, 0.08);--fc-text: #f5f5f5;--fc-text-muted: rgba(255, 255, 255, 0.56);--fc-surface: #171717;--fc-subtle: rgba(255, 255, 255, 0.02);--fc-subtle-hover: rgba(255, 255, 255, 0.08);--fc-border: #2a2a2a}.fc-agent-first{position:relative;margin:20px 0 32px;border:1px solid var(--fc-border);background:var(--fc-surface)}.fc-agent-first-header{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;padding:24px}.fc-agent-first-header h3,.fc-client-panel h4{margin:0;color:var(--fc-text);font-weight:600}.fc-agent-first-header h3{font-size:20px;line-height:28px}.fc-agent-first-header p,.fc-agent-first-header [data-as=\"p\"]{display:block;max-width:600px;margin:6px 0 0;color:var(--fc-text-muted);font-size:14px;line-height:20px}.fc-all-options-link{display:inline-flex;flex:none;align-items:center;gap:6px;margin-top:3px;color:var(--fc-text-muted)!important;font-size:13px;font-weight:500;text-decoration:none!important;transition:color 160ms ease}.fc-all-options-link:hover{color:var(--fc-heat)!important}.fc-client-tabs{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0, 1fr);overflow-x:auto;border-top:1px solid var(--fc-border);border-bottom:1px solid var(--fc-border);scrollbar-width:thin}.fc-client-tab{position:relative;display:flex;min-width:0;overflow:hidden;flex-direction:column;align-items:center;gap:8px;padding:14px 10px;border:0;border-right:1px solid var(--fc-border);background:transparent;color:var(--fc-text);cursor:pointer;text-align:center;transition:background-color 160ms ease}.fc-client-tab:last-child{border-right:0}.fc-client-tab:hover{background:var(--fc-subtle)}.fc-client-tab.is-active{background:var(--fc-heat-soft);box-shadow:inset 0 2px 0 var(--fc-heat)}.fc-client-tab:focus-visible,.fc-copy-button:focus-visible,.fc-install-button:focus-visible,.fc-agent-prompt-button:focus-visible,.fc-all-options-link:focus-visible{outline:2px solid var(--fc-heat);outline-offset:-2px}.fc-client-icon{display:block;width:26px;height:26px;flex:none;object-fit:contain}.dark .fc-client-icon-mono{filter:invert(1) brightness(1.6)}.dark img[src*=\"agent-clients/chatgpt.svg\"],.dark img[src*=\"agent-clients/cursor.svg\"]{filter:invert(1) brightness(1.6)}.fc-client-tab-copy{display:flex;min-width:0;max-width:100%;flex-direction:column;gap:2px}.fc-client-tab-copy strong{overflow:hidden;color:var(--fc-text);font-size:14px;line-height:20px;text-overflow:ellipsis;white-space:nowrap}.fc-client-tab-copy>span{overflow:hidden;color:var(--fc-text-muted);font-size:13px;line-height:18px;text-overflow:ellipsis;white-space:nowrap}.fc-client-panel{display:flex;flex-direction:column;gap:14px;padding:20px 24px 24px}.fc-client-panel[hidden]{display:none}.fc-client-description,.fc-client-description[data-as=\"p\"],.fc-client-hint,.fc-client-hint[data-as=\"p\"]{display:block;margin:0;color:var(--fc-text-muted);font-size:14px;line-height:21px}.fc-client-hint,.fc-client-hint[data-as=\"p\"]{font-size:13px;line-height:20px}.fc-client-description code,.fc-client-description[data-as=\"p\"] code,.fc-client-hint code,.fc-client-hint[data-as=\"p\"] code{border-radius:4px;background:var(--fc-subtle-hover);padding:2px 5px;color:var(--fc-text);font-size:0.92em}.fc-code-block{overflow:hidden;border:1px solid var(--fc-border);border-radius:6px;background:var(--fc-subtle)}.fc-code-header{display:flex;min-height:38px;align-items:center;justify-content:space-between;gap:12px;padding:5px 8px 5px 14px;border-bottom:1px solid var(--fc-border);color:var(--fc-text-muted);font-size:12px;font-weight:500}.fc-code-block pre{margin:0;padding:14px 16px;overflow-x:auto;background:transparent;color:var(--fc-text);font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;font-size:12.5px;line-height:20px;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word}.fc-code-block pre code{display:block;white-space:inherit;overflow-wrap:inherit;word-break:inherit}.fc-command-row{display:flex;align-items:center;gap:4px;padding:4px;border:1px solid var(--fc-border);border-radius:8px;background:var(--fc-subtle)}.fc-command-scroll{display:flex;min-width:0;flex:1;align-items:center;gap:10px;padding:7px 6px 7px 12px;overflow-x:auto;scrollbar-width:none;-webkit-mask-image:linear-gradient(90deg, #000 calc(100% - 24px), transparent);mask-image:linear-gradient(90deg, #000 calc(100% - 24px), transparent)}.fc-command-scroll::-webkit-scrollbar{display:none}.fc-command-prompt{flex:none;color:var(--fc-text-muted);font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;font-size:13px;line-height:20px;user-select:none}.fc-command-scroll code{padding:0 20px 0 0;border:0;border-radius:0;background:transparent;color:var(--fc-text);font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;font-size:13px;line-height:20px;white-space:nowrap}.fc-copy-button{display:inline-flex;min-width:78px;height:28px;align-items:center;justify-content:center;gap:6px;padding:0 9px;border:0;border-radius:6px;background:transparent;color:var(--fc-text-muted);cursor:pointer;font-size:12px;font-weight:500;transition:background-color 160ms ease, color 160ms ease}.fc-copy-button:hover{background:var(--fc-subtle-hover);color:var(--fc-text)}.fc-copy-button.is-copied{background:var(--fc-heat-soft);color:var(--fc-heat)}.fc-install-button{display:inline-flex;width:fit-content;min-height:34px;align-items:center;justify-content:center;gap:7px;padding:0 12px;border-radius:6px;background:var(--fc-subtle-hover);color:var(--fc-text)!important;font-size:13px;font-weight:600;text-decoration:none!important;transition:background-color 160ms ease, transform 160ms ease}.fc-install-button:hover{background:var(--fc-heat-soft)}.fc-install-button:active,.fc-agent-prompt-button:active{transform:scale(0.98)}.fc-agent-prompt{margin:14px 0 28px}.fc-openai-install-actions{display:flex;flex-wrap:wrap;gap:12px}.fc-openai-install-actions a{text-decoration:none!important;color:var(--fc-text)!important}.fc-openai-install-actions img{flex:none;object-fit:contain}.fc-openai-install-hint{margin:12px 0 0;color:var(--fc-text-muted);font-size:13px;line-height:1.6}.fc-agent-prompt-button{display:inline-flex;min-height:44px;align-items:center;justify-content:center;gap:8px;padding:0 18px;border:0;border-radius:10px;background:var(--fc-subtle-hover);color:var(--fc-text);cursor:pointer;font-size:14px;font-weight:600;box-shadow:inset 0 0.75px 0.75px 0 rgba(0, 0, 0, 0.02),\n inset 0 0.25px 0.25px 0 rgba(0, 0, 0, 0.04);transition:background-color 160ms ease, color 160ms ease, transform 160ms ease}.fc-agent-prompt-button:hover{background:rgba(0, 0, 0, 0.08)}.dark .fc-agent-prompt-button:hover{background:rgba(255, 255, 255, 0.1)}.fc-agent-prompt-button.is-copied{background:var(--fc-heat-soft);color:var(--fc-heat);box-shadow:none}.fc-agent-first-footer{display:flex;flex-direction:column;gap:10px;padding:16px 24px 20px;border-top:1px solid var(--fc-border);background:var(--fc-subtle)}.card [data-component-part=\"card-icon\"] img{margin:0}div:has(>a>div.w-full>div.mt-8){height:100%;padding-bottom:60px}a>div.w-full>div.mt-8{position:absolute;right:24px;bottom:20px;left:24px;margin-top:0}.fc-footer-lead,.fc-footer-lead[data-as=\"p\"]{display:block;margin:0;color:var(--fc-text);font-size:13px;font-weight:500;line-height:20px}.fc-curvy-corners,.fc-curve{pointer-events:none}.fc-curve{position:absolute;z-index:3;width:11px;height:11px;fill:var(--fc-border)}.fc-curve-tl{top:0;left:0;transform:rotate(-90deg)}.fc-curve-tr{top:0;right:0}.fc-curve-bl{bottom:0;left:0;transform:rotate(180deg)}.fc-curve-br{right:0;bottom:0;transform:rotate(90deg)}.fc-sr-only{position:absolute;width:1px;height:1px;overflow:hidden;margin:-1px;padding:0;border:0;clip:rect(0, 0, 0, 0);white-space:nowrap}@media (max-width: 700px){.fc-agent-first-header{flex-direction:column;gap:12px;padding:20px}.fc-client-tabs{grid-auto-flow:row;grid-template-columns:repeat(2, minmax(0, 1fr))}.fc-client-tab:nth-child(2n){border-right:0}.fc-client-tab{border-bottom:1px solid var(--fc-border)}.fc-client-tab:nth-last-child(-n+2):nth-child(odd),.fc-client-tab:last-child{border-bottom:0}.fc-client-panel{padding:16px 20px 20px}.fc-command-scroll code,.fc-command-prompt{font-size:12px}.fc-agent-first-footer{padding:14px 20px 18px}.fc-install-button,.fc-agent-prompt-button{width:100%}}@media (prefers-reduced-motion: reduce){.fc-agent-first *,.fc-agent-prompt *{scroll-behavior:auto!important;transition-duration:0.01ms!important}}"}],"page":{"pagePath":"es/webhooks/security","slug":"/es/webhooks/security","pageMetadata":{"title":"Seguridad","description":"Verificar la autenticidad de los webhooks","og:title":"Seguridad de los webhooks | Firecrawl","og:description":"Verificar la autenticidad de los webhooks","icon":"shield-check","href":"/es/webhooks/security"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Verificar la autenticidad de los webhooks\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"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`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Verifica que cada solicitud de webhook provenga realmente de Firecrawl comprobando su firma HMAC-SHA256. Esto evita que los atacantes falsifiquen la carga útil y te permite confiar en los datos antes de actuar en consecuencia.`}),`\n`,_jsx(Heading,{level:`2`,id:`secret-key`,children:`Clave secreta`}),`\n`,_jsxs(_components.p,{children:[`Tu secreto de webhook está disponible en la `,_jsx(_components.a,{href:`https://www.firecrawl.dev/app/settings?tab=advanced`,children:`pestaña Advanced`}),` de la configuración de tu cuenta. Cada cuenta tiene un secreto único que se utiliza para firmar todas las solicitudes de webhook.`]}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Mantén tu secreto de webhook seguro y nunca lo expongas públicamente. Si crees que tu secreto se ha visto comprometido, regénéralo de inmediato desde la configuración de tu cuenta.`})}),`\n`,_jsx(Heading,{level:`2`,id:`signature-verification`,children:`Verificación de firmas`}),`\n`,_jsxs(_components.p,{children:[`Cada solicitud de webhook incluye un encabezado `,_jsx(_components.code,{children:`X-Firecrawl-Signature`}),`:`]}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`X-Firecrawl-Signature: sha256=abc123def456...`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`3`,id:`how-to-verify`,children:`Cómo verificar`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Extrae la firma del encabezado `,_jsx(_components.code,{children:`X-Firecrawl-Signature`})]}),`\n`,_jsx(_components.li,{children:`Obtén el cuerpo sin procesar de la solicitud (antes de analizarlo)`}),`\n`,_jsx(_components.li,{children:`Calcula el HMAC-SHA256 usando tu clave secreta`}),`\n`,_jsx(_components.li,{children:`Compara las firmas usando una función de comparación segura frente al tiempo`}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`implementation`,children:`Implementación`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Node/Express`,numberOfLines:`41`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`41`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` crypto`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'crypto'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` express`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'express'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` app`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` express`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Usa el analizador de cuerpo en bruto para verificar la firma`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`app`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`use`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'/webhook/firecrawl'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`express`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`raw`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`type:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'application/json'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }));`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`app`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`post`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'/webhook/firecrawl'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`req`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`res`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` signature`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` req`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`get`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'X-Firecrawl-Signature'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` webhookSecret`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`FIRECRAWL_WEBHOOK_SECRET`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` `})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`signature`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ||`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`webhookSecret`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` res`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`status`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`401`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`send`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'No autorizado'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` `})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Extrae el hash del encabezado de la firma`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`algorithm`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`hash`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` signature`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`split`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'='`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`algorithm`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !==`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'sha256'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` res`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`status`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`401`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`send`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Algoritmo de firma no válido'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` `})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Calcula la firma esperada`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` expectedSignature`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` crypto`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`createHmac`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'sha256'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`webhookSecret`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`update`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`req`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`body`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`digest`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'hex'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` `})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Verifica la firma usando una comparación segura contra ataques de temporización`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`crypto`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`timingSafeEqual`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Buffer`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`hash`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'hex'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`), `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Buffer`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`expectedSignature`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'hex'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`))) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` res`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`status`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`401`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`send`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Firma no válida'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` `})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Analiza y procesa el webhook verificado`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` event`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`parse`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`req`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`body`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Webhook de Firecrawl verificado:'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`event`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` `})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` res`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`status`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`200`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`send`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'ok'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`app`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`listen`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`3000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, () `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Escuchando en el puerto 3000'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`));`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python/Flask`,numberOfLines:`42`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`42`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` hmac`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` hashlib`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` flask `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Flask, request, abort`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`app `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Flask(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:`__name__`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`WEBHOOK_SECRET`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'your-webhook-secret-here'`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Consíguelo en el panel de Firecrawl`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`@app.post`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'/webhook/firecrawl'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` webhook`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`():`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` signature `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` request.headers.get(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'X-Firecrawl-Signature'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` `})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` not`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` signature:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` abort(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`401`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Falta el encabezado de la firma'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` `})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Extrae el hash del encabezado de la firma`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` try`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` algorithm, hash_value `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` signature.split(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'='`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` algorithm `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'sha256'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` abort(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`401`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Algoritmo de firma inválido'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` except`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` ValueError`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` abort(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`401`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Formato de firma inválido'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` `})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Calcula la firma esperada`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` expected_signature `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` hmac.new(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` WEBHOOK_SECRET`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.encode(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'utf-8'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` request.data,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` hashlib.sha256`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ).hexdigest()`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` `})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Verifica la firma usando una comparación segura frente a ataques de tiempo`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` not`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` hmac.compare_digest(hash_value, expected_signature):`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` abort(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`401`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Firma inválida'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` `})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Analiza y procesa el webhook verificado`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` event `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` request.get_json(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`force`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Webhook de Firecrawl verificado:'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, event)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` `})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'ok'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`200`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` __name__`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ==`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '__main__'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` app.run(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`port`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`3000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`best-practices`,children:`Buenas prácticas`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Verifica cada solicitud.`}),` Comprueba siempre la firma antes de procesar una carga útil de webhook. Rechaza cualquier solicitud que no supere la verificación con un código de estado `,_jsx(_components.code,{children:`401`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Usa comparaciones seguras en tiempo constante.`}),` Las comparaciones de cadenas estándar pueden filtrar información por temporización. Usa `,_jsx(_components.code,{children:`crypto.timingSafeEqual()`}),` en Node.js o `,_jsx(_components.code,{children:`hmac.compare_digest()`}),` en Python.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Expón tu endpoint a través de HTTPS.`}),` Esto garantiza que las cargas útiles de webhook estén cifradas durante la transmisión.`]}),`\n`]})]})}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":"Seguridad","description":"Verificar la autenticidad de los webhooks","og:title":"Seguridad de los webhooks | Firecrawl","og:description":"Verificar la autenticidad de los webhooks","icon":"shield-check","href":"/es/webhooks/security"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Clave secreta","slug":"secret-key","depth":2,"children":[]},{"title":"Verificación de firmas","slug":"signature-verification","depth":2,"children":[{"title":"Cómo verificar","slug":"how-to-verify","depth":3,"children":[]},{"title":"Implementación","slug":"implementation","depth":3,"children":[]}]},{"title":"Buenas prácticas","slug":"best-practices","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/firecrawl/0081870911af9531/ready-to-build-cta.js","/_mintlify/custom/firecrawl/d82a383589d76971/chatbase-widget.js"],"subdomain":"firecrawl","siteName":"Firecrawl Docs","title":"Seguridad de los webhooks | Firecrawl","navMaps":{"firstHrefInVersion":{"v2":{"href":"/es/webhooks/security","matchLevel":0},"v1":{"href":"/es/webhooks/security","matchLevel":0}},"firstHrefInLanguage":{"en":{"href":"/webhooks/security","matchLevel":1},"es":{"href":"/es/webhooks/security","matchLevel":0},"fr":{"href":"/fr/webhooks/security","matchLevel":1},"ja":{"href":"/ja/webhooks/security","matchLevel":1},"pt-BR":{"href":"/pt-BR/webhooks/security","matchLevel":1},"zh":{"href":"/zh/webhooks/security","matchLevel":1}}},"lastModified":"2026-09-27T17:30:04.435Z","originalFileLocation":"es/webhooks/security.mdx","locale":"es"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;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=\"system\"}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=\"Verificar la autenticidad de los webhooks\">\u003cmeta data-mint-head name=\"application-name\" content=\"Firecrawl Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/firecrawl/XqnL63rz4lpKQF4P/_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/firecrawl/XqnL63rz4lpKQF4P/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/firecrawl/XqnL63rz4lpKQF4P/_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/firecrawl/XqnL63rz4lpKQF4P/_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/firecrawl/XqnL63rz4lpKQF4P/_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/firecrawl/XqnL63rz4lpKQF4P/_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/firecrawl/XqnL63rz4lpKQF4P/_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/firecrawl/XqnL63rz4lpKQF4P/_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/firecrawl/XqnL63rz4lpKQF4P/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Seguridad de los webhooks | Firecrawl\">\u003cmeta data-mint-head property=\"og:description\" content=\"Verificar la autenticidad de los webhooks\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Firecrawl Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.firecrawl.dev/es/webhooks/security\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://firecrawl.mintlify.site/_mintlify/api/og/v2?division=Webhooks\u0026amp;title=Seguridad\u0026amp;description=Verificar+la+autenticidad+de+los+webhooks\u0026amp;theme=6686a97727e4f15703abe779\u0026amp;signature=09d5f2b9bfc705f74eea512765c621b057ce312ad3b8b82efc684e004f78e431\">\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=\"Seguridad de los webhooks | Firecrawl\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Verificar la autenticidad de los webhooks\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://firecrawl.mintlify.site/_mintlify/api/og/v2?division=Webhooks\u0026amp;title=Seguridad\u0026amp;description=Verificar+la+autenticidad+de+los+webhooks\u0026amp;theme=6686a97727e4f15703abe779\u0026amp;signature=09d5f2b9bfc705f74eea512765c621b057ce312ad3b8b82efc684e004f78e431\">\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/firecrawl/XqnL63rz4lpKQF4P/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Firecrawl Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#000\">\u003cmeta data-mint-head name=\"google-site-verification\" content=\"Y83UZz1dXMKuT59lnLY_7umo6LJorqIwuP_2rFX6_eE\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.firecrawl.dev/es/webhooks/security\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/es/webhooks/security.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"es\" href=\"https://docs.firecrawl.dev/es/webhooks/security\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.firecrawl.dev/webhooks/security\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"fr\" href=\"https://docs.firecrawl.dev/fr/webhooks/security\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ja\" href=\"https://docs.firecrawl.dev/ja/webhooks/security\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"pt-BR\" href=\"https://docs.firecrawl.dev/pt-BR/webhooks/security\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh\" href=\"https://docs.firecrawl.dev/zh/webhooks/security\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.firecrawl.dev/webhooks/security\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.firecrawl.dev/#organization\",\"name\":\"Firecrawl Docs\",\"url\":\"https://docs.firecrawl.dev\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/firecrawl/iilnMwCX-8eR1yOO/logo/logo.png?fit=max\u0026auto=format\u0026n=iilnMwCX-8eR1yOO\u0026q=85\u0026s=c45b3c967c19a39190e76fe8e9c2ed5a\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.firecrawl.dev#website\",\"name\":\"Firecrawl Docs\",\"url\":\"https://docs.firecrawl.dev\",\"publisher\":{\"@id\":\"https://docs.firecrawl.dev/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.firecrawl.dev/es/webhooks/security#webpage\",\"url\":\"https://docs.firecrawl.dev/es/webhooks/security\",\"name\":\"Seguridad\",\"description\":\"Verificar la autenticidad de los webhooks\",\"dateModified\":\"2026-09-27T17:30:04.435Z\",\"isPartOf\":{\"@id\":\"https://docs.firecrawl.dev#website\"},\"breadcrumb\":{\"@id\":\"https://docs.firecrawl.dev/es/webhooks/security#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.firecrawl.dev/es/webhooks/security#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Webhooks\",\"item\":\"https://docs.firecrawl.dev/es/webhooks/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Seguridad\",\"item\":\"https://docs.firecrawl.dev/es/webhooks/security\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.firecrawl.dev/es/webhooks/security#article\",\"headline\":\"Seguridad\",\"name\":\"Seguridad\",\"description\":\"Verificar la autenticidad de los webhooks\",\"url\":\"https://docs.firecrawl.dev/es/webhooks/security\",\"mainEntityOfPage\":{\"@id\":\"https://docs.firecrawl.dev/es/webhooks/security#webpage\"},\"dateModified\":\"2026-09-27T17:30:04.435Z\",\"publisher\":{\"@id\":\"https://docs.firecrawl.dev/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.firecrawl.dev#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Firecrawl Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Firecrawl Docs","nav":{"global":null,"languages":[{"language":"en","pages":[{"title":"en","href":"/webhooks/security"}]},{"language":"es","versions":[{"version":"v2","tabs":[{"tab":"Documentación","groups":[{"group":"Primeros pasos","pages":[{"title":"Introducción","href":"/es/introduction"},{"title":"Firecrawl en ChatGPT y Codex","sidebarTitle":"ChatGPT y Codex","icon":"https://mintlify.s3.us-west-1.amazonaws.com/firecrawl/images/agent-clients/codex.svg","href":"/es/integrations/chatgpt-codex"},{"sidebarTitle":"Claude y Claude Code","title":"Firecrawl en Claude y Claude Code","icon":"https://mintlify.s3.us-west-1.amazonaws.com/firecrawl/images/agent-clients/claude-ai.svg","href":"/es/quickstarts/claude-code"},{"sidebarTitle":"Claude Desktop y Cowork","title":"Firecrawl en Claude Desktop y Cowork","icon":"https://mintlify.s3.us-west-1.amazonaws.com/firecrawl/images/agent-clients/claude-ai.svg","href":"/es/quickstarts/claude-desktop"},{"sidebarTitle":"Cursor","icon":"https://mintlify.s3.us-west-1.amazonaws.com/firecrawl/images/agent-clients/cursor.svg","title":"Búsqueda web y scraping con MCP en Cursor","href":"/es/quickstarts/cursor"},{"group":"MCP","root":{"title":"Primeros pasos","sidebarTitle":"Primeros pasos","href":"/es/mcp-server"},"pages":[{"title":"Primeros pasos","sidebarTitle":"Primeros pasos","href":"/es/mcp-server"},{"title":"Para agentes","sidebarTitle":"Para agentes","href":"/es/mcp-server/keyless"},{"title":"Para personas","sidebarTitle":"Para personas","href":"/es/mcp-server/oauth"}]},{"title":"CLI","href":"/es/sdks/cli"},{"title":"Guía avanzada de scraping","href":"/es/advanced-scraping-guide"},{"group":"Planes y facturación","pages":[{"title":"Facturación","href":"/es/billing"},{"title":"Límites de tasa","href":"/es/rate-limits"},{"title":"Créditos de socio","href":"/es/partner-credits"}]},{"group":"Empresas","pages":[{"title":"Enterprise","href":"/es/enterprise"},{"title":"Descripción general de seguridad","href":"/es/security"},{"title":"SSO y SCIM","href":"/es/features/sso"},{"title":"Restricciones de IP","href":"/es/features/ip-restrictions"},{"title":"Restricciones de claves","href":"/es/features/key-restrictions"},{"title":"Protección contra amenazas","href":"/es/features/threat-protection"},{"title":"Registro de auditoría SIEM","href":"/es/features/siem"}]}]},{"group":"Endpoints principales","pages":[{"group":"Búsqueda","icon":"magnifying-glass","pages":[{"title":"Búsqueda","icon":"magnifying-glass","href":"/es/features/search"},{"title":"Highlights de búsqueda","icon":"highlighter","href":"/es/features/search-highlights"},{"title":"Índice de investigación","icon":"book-open","href":"/es/features/research"},{"title":"Índice para desarrolladores","icon":"code","href":"/es/features/developer"},{"title":"Government Index","icon":"scale-balanced","href":"/es/features/gov"}]},{"group":"Scraping","icon":"markdown","pages":[{"title":"extracción de datos web","href":"/es/features/scrape"},{"title":"Scraping más rápido","href":"/es/features/fast-scraping"},{"title":"Raspado en lote","href":"/es/features/batch-scrape"},{"title":"Modo JSON - Resultado estructurado","sidebarTitle":"Modo JSON","href":"/es/features/llm-extract"},{"title":"Seguimiento de cambios","sidebarTitle":"Seguimiento de cambios","href":"/es/features/change-tracking"},{"title":"Modo mejorado","href":"/es/features/enhanced-mode"},{"title":"Modo de bloqueo","href":"/es/features/lockdown"},{"title":"Redacción de PII","href":"/es/features/pii-redaction"},{"title":"Proxies","href":"/es/features/proxies"},{"title":"Análisis de documentos","href":"/es/features/document-parsing"}]},{"group":"Monitorización","icon":"radar","pages":[{"title":"Monitoreo","icon":"radar","href":"/es/features/monitoring"},{"title":"Supervisión de páginas","sidebarTitle":"Página","icon":"file-lines","href":"/es/features/monitoring-page"},{"title":"Supervisión de sitios web","sidebarTitle":"Sitio web","icon":"spider","href":"/es/features/monitoring-website"},{"title":"Monitorización a escala de toda la web","sidebarTitle":"Toda la web a escala","icon":"globe","href":"/es/features/monitoring-web-scale"}]},{"group":"Interacción / sandbox del navegador","icon":"hand-pointer","pages":[{"title":"Interact tras el scraping","sidebarTitle":"Interact","icon":"hand-pointer","href":"/es/features/interact"},{"title":"sandbox del navegador","icon":"browser","sidebarTitle":"sandbox del navegador","href":"/es/features/browser"}]}]},{"group":"Más","pages":[{"title":"Alexandria","icon":"books","href":"/es/features/alexandria"},{"title":"Procesar","icon":"file-magnifying-glass","version":"v2","sidebarTitle":"Procesar","href":"/es/features/parse"},{"title":"Mapa","icon":"map","version":"v2","sidebarTitle":"Mapa","href":"/es/features/map"},{"title":"Rastrear","icon":"spider","href":"/es/features/crawl"},{"title":"Agent","sidebarTitle":"Agent","icon":"magic","href":"/es/features/agent"}]},{"group":"Inicios rápidos","pages":[{"group":"Node.js","pages":[{"title":"Node.js","href":"/es/quickstarts/nodejs"},{"title":"Next.js","href":"/es/quickstarts/nextjs"},{"title":"Express","href":"/es/quickstarts/express"},{"title":"NestJS","href":"/es/quickstarts/nestjs"},{"title":"Fastify","href":"/es/quickstarts/fastify"},{"title":"Hono","href":"/es/quickstarts/hono"},{"title":"Bun","href":"/es/quickstarts/bun"},{"title":"Remix","href":"/es/quickstarts/remix"},{"title":"Nuxt","href":"/es/quickstarts/nuxt"},{"title":"SvelteKit","href":"/es/quickstarts/sveltekit"},{"title":"Astro","href":"/es/quickstarts/astro"},{"title":"Mastra","href":"/es/quickstarts/mastra"}]},{"group":"Serverless","pages":[{"title":"Cloudflare Workers","href":"/es/quickstarts/cloudflare-workers"},{"title":"Funciones de Vercel","href":"/es/quickstarts/vercel-functions"},{"title":"Vercel Marketplace","href":"/es/quickstarts/vercel-marketplace"},{"title":"AWS Lambda","href":"/es/quickstarts/aws-lambda"},{"title":"Supabase Edge Functions","href":"/es/quickstarts/supabase-edge-functions"},{"title":"Deno Deploy","href":"/es/quickstarts/deno-deploy"}]},{"group":"PHP","pages":[{"title":"PHP","href":"/es/quickstarts/php"},{"title":"Laravel","href":"/es/quickstarts/laravel"}]},{"group":"Ruby","pages":[{"title":"Ruby","href":"/es/quickstarts/ruby"},{"title":"Rails","href":"/es/quickstarts/rails"}]},{"group":"Python","pages":[{"title":"Python","href":"/es/quickstarts/python"},{"title":"FastAPI","href":"/es/quickstarts/fastapi"},{"title":"Django","href":"/es/quickstarts/django"},{"title":"Flask","href":"/es/quickstarts/flask"}]},{"title":"Go","href":"/es/quickstarts/go"},{"title":"Rust","href":"/es/quickstarts/rust"},{"title":"Elixir","href":"/es/quickstarts/elixir"},{"group":"Java","pages":[{"title":"Java","href":"/es/quickstarts/java"},{"title":"Spring Boot","href":"/es/quickstarts/spring-boot"}]},{"group":".NET","pages":[{"title":".NET","href":"/es/quickstarts/dotnet"},{"title":"ASP.NET Core","href":"/es/quickstarts/aspnet-core"}]}]},{"group":"Guías para desarrolladores","pages":[{"title":"Plantillas Full‑Stack","icon":"star","href":"/es/developer-guides/examples"},{"group":"Guías de uso","icon":"compass","pages":[{"title":"Cómo elegir el extractor de datos","sidebarTitle":"Cómo elegir el extractor de datos","href":"/es/developer-guides/usage-guides/choosing-the-data-extractor"},{"title":"Verificación de actualidad y vigencia","sidebarTitle":"Verificación de actualidad y vigencia","href":"/es/developer-guides/usage-guides/verifying-freshness-and-liveness"}]},{"group":"SDKs y frameworks para LLM","icon":"puzzle-piece","pages":[{"title":"OpenAI","href":"/es/developer-guides/llm-sdks-and-frameworks/openai"},{"title":"Anthropic","href":"/es/developer-guides/llm-sdks-and-frameworks/anthropic"},{"title":"Gemini","href":"/es/developer-guides/llm-sdks-and-frameworks/gemini"},{"title":"Kit de desarrollo de agentes (ADK)","href":"/es/developer-guides/llm-sdks-and-frameworks/google-adk"},{"title":"Fundamenta Gemini en Vertex AI con la búsqueda de Firecrawl","href":"/es/developer-guides/llm-sdks-and-frameworks/vertex-ai-grounding"},{"title":"Vercel AI SDK","href":"/es/developer-guides/llm-sdks-and-frameworks/vercel-ai-sdk"},{"title":"LangChain","href":"/es/developer-guides/llm-sdks-and-frameworks/langchain"},{"title":"LangGraph","href":"/es/developer-guides/llm-sdks-and-frameworks/langgraph"},{"title":"LlamaIndex","href":"/es/developer-guides/llm-sdks-and-frameworks/llamaindex"},{"title":"Mastra","href":"/es/developer-guides/llm-sdks-and-frameworks/mastra"},{"title":"ElevenAgents","href":"/es/developer-guides/llm-sdks-and-frameworks/elevenagents"},{"title":"Jev","href":"/es/developer-guides/llm-sdks-and-frameworks/jev"}]},{"group":"Cookbooks","icon":"book","pages":[{"title":"Cómo crear un asistente de investigación con IA usando Firecrawl y el AI SDK","href":"/es/developer-guides/cookbooks/ai-research-assistant-cookbook"},{"title":"Crear un generador de guías de estilo de marca con Firecrawl","href":"/es/developer-guides/cookbooks/brand-style-guide-generator-cookbook"}]},{"group":"Plataformas y frameworks","icon":"puzzle-piece","pages":[{"title":"Hermes Agent","href":"/es/integrations/hermes"},{"title":"Replit","href":"/es/integrations/replit"},{"title":"Lovable","href":"/es/integrations/lovable"},{"title":"Stripe Projects","href":"/es/integrations/stripe-projects"},{"title":"LangChain","href":"/es/integrations/langchain"},{"title":"LlamaIndex","href":"/es/integrations/llamaindex"},{"title":"CrewAI","href":"/es/integrations/crewai"},{"title":"Camel AI","href":"/es/integrations/camelai"},{"title":"Praison AI","href":"/es/integrations/praison"},{"title":"Neuron AI","href":"/es/integrations/neuron-ai"},{"title":"Dify","href":"/es/integrations/dify"},{"title":"Langflow","href":"/es/integrations/langflow"},{"title":"Flowise","href":"/es/integrations/flowise"},{"title":"Zapier","href":"/es/integrations/zapier"},{"title":"Make","href":"/es/integrations/make"},{"title":"n8n","href":"/es/integrations/n8n"},{"title":"Tines","href":"/es/integrations/tines"},{"title":"Pipedream","href":"/es/integrations/pipedream"},{"title":"Composio","href":"/es/integrations/composio"}]}]},{"group":"Webhooks","pages":[{"title":"Descripción general","icon":"link","href":"/es/webhooks/overview"},{"title":"Tipos de eventos","description":"Referencia de eventos de webhook","icon":"bolt","href":"/es/webhooks/events"},{"title":"Seguridad","icon":"shield-check","href":"/es/webhooks/security"},{"title":"Pruebas","description":"Probar y depurar webhooks","icon":"bug","href":"/es/webhooks/testing"}]},{"group":"Casos de uso","pages":[{"title":"Casos de uso","sidebarTitle":"Descripción general","icon":"sparkles","href":"/es/use-cases/overview"},{"title":"Plataformas de IA","sidebarTitle":"Plataformas de IA","icon":"robot","href":"/es/use-cases/ai-platforms"},{"title":"Enriquecimiento de leads","sidebarTitle":"Enriquecimiento de leads","icon":"user-plus","href":"/es/use-cases/lead-enrichment"},{"title":"Plataformas SEO","sidebarTitle":"Plataformas SEO","icon":"magnifying-glass","href":"/es/use-cases/seo-platforms"},{"title":"Investigación profunda","sidebarTitle":"Investigación profunda","icon":"microscope","href":"/es/use-cases/deep-research"},{"group":"Ver más","pages":[{"title":"Producto y comercio electrónico","sidebarTitle":"Producto y comercio electrónico","icon":"cart-shopping","href":"/es/use-cases/product-ecommerce"},{"title":"Generación de contenido","sidebarTitle":"Generación de contenido","icon":"pen","href":"/es/use-cases/content-generation"},{"title":"Desarrolladores y MCP","sidebarTitle":"Desarrolladores y MCP","icon":"code","href":"/es/use-cases/developers-mcp"},{"title":"Inversión y finanzas","sidebarTitle":"Inversión y finanzas","icon":"chart-line","href":"/es/use-cases/investment-finance"},{"title":"Inteligencia competitiva","sidebarTitle":"Inteligencia competitiva","icon":"binoculars","href":"/es/use-cases/competitive-intelligence"},{"title":"Migración de datos","sidebarTitle":"Migración de datos","icon":"arrows-rotate","href":"/es/use-cases/data-migration"},{"title":"Observabilidad y monitoreo","sidebarTitle":"Observabilidad","icon":"chart-mixed","href":"/es/use-cases/observability"}]}]},{"group":"Otros","pages":[{"title":"Descripción general","href":"/es/dashboard"},{"title":"Depura Firecrawl con Ask","sidebarTitle":"Depura con Ask","icon":"messages-question","href":"/es/features/ask"}]},{"group":"Contribuciones","pages":[{"title":"Código abierto o Firecrawl Cloud","sidebarTitle":"Código abierto vs. Cloud","href":"/es/contributing/open-source-or-cloud"},{"title":"Configuración para colaboradores de Firecrawl","sidebarTitle":"Configuración para colaboradores","href":"/es/contributing/guide"},{"title":"Autoalojamiento de Firecrawl","sidebarTitle":"Autoalojamiento","href":"/es/contributing/self-host"}]}]},{"tab":"SDKs","pages":[{"title":"SDKs","href":"/es/sdks/overview"}]},{"tab":"Referencia de la API","pages":[{"title":"Referencia de la API","href":"/es/api-reference/v2-introduction"}]},{"tab":"Crear con IA","pages":[{"title":"Crear con IA","href":"/es/ai-onboarding"}]}]},{"version":"v1","hidden":true,"tabs":[{"tab":"Documentación","hidden":true,"searchable":true,"groups":[{"group":"Primeros pasos","pages":[{"title":"Introducción","description":"La API de contexto para agentes de IA. Busca en la web, haz scraping de cualquier página e interactúa con ella desde una sola API.","href":"/es/introduction"},{"title":"Primeros pasos","description":"Configura Firecrawl MCP con acceso sin clave, inicio de sesión en la cuenta o una clave de API.","sidebarTitle":"Primeros pasos","href":"/es/mcp-server"},{"title":"Guía avanzada de scraping","description":"Configura opciones de scraping, acciones del navegador, rastreo, mapeo y el endpoint del agente con todas las capacidades de la API de Firecrawl.","href":"/es/advanced-scraping-guide"},{"group":"Planes y facturación","pages":[{"title":"Facturación","description":"Cómo funcionan la facturación, los créditos y los planes en Firecrawl","href":"/es/billing"},{"title":"Límites de tasa","description":"Límites de tasa para distintos planes y solicitudes de API","href":"/es/rate-limits"},{"title":"Créditos de socio","description":"Cómo funcionan los créditos de socio de Firecrawl, incluidos los requisitos, la caducidad y los límites del plan","href":"/es/partner-credits"}]},{"group":"Empresa","pages":[{"title":"Enterprise","description":"Planes Enterprise, seguridad y funciones de Firecrawl a gran escala","href":"/es/enterprise"},{"title":"Descripción general de seguridad","description":"Cómo protege Firecrawl tus datos: retención cero de datos, DPA, SSO, controles de acceso y residencia de datos, todo en un solo lugar para tu revisión de seguridad.","href":"/es/security"},{"title":"SSO y SCIM","description":"Configura el inicio de sesión único (SSO) y la sincronización de directorio SCIM para que tu equipo inicie sesión a través de tu provider de identidad y el acceso de los usuarios se mantenga sincronizado con tu directorio.","href":"/es/features/sso"},{"title":"Restricciones de IP","description":"Restringe las claves de API de tu equipo a una lista de permitido de direcciones IP o rangos CIDR, para que solo funcionen desde redes aprobadas. Aplicadas en el servidor.","href":"/es/features/ip-restrictions"},{"title":"Restricciones de claves","description":"Restringe una clave de API individual a formatos de salida y endpoints específicos. Se aplica del lado del servidor, sin que una solicitud pueda omitirlo.","href":"/es/features/key-restrictions"},{"title":"Protección contra amenazas","description":"Bloquea solicitudes a URL riesgosas en todos los endpoints mediante una política controlada por tu organización. Se aplica en el servidor.","href":"/es/features/threat-protection"},{"title":"Registro de auditoría SIEM","description":"Envía un evento de auditoría estructurado a tu propio SIEM por cada scraping que realiza tu equipo, comenzando con Microsoft Sentinel. Entrega del lado del servidor.","href":"/es/features/siem"}]}]},{"group":"Novedades","pages":[{"group":"Agente","icon":"magic","hidden":true,"pages":[]}]},{"group":"Características estándar","pages":[{"group":"Extracción","icon":"markdown","pages":[{"title":"extracción de datos web","description":"Convierte cualquier URL en markdown limpio o datos estructurados","href":"/es/features/scrape"},{"title":"Scraping más rápido","description":"Acelera tus scrapes un 500% con el parámetro maxAge","href":"/es/features/fast-scraping"},{"title":"Raspado en lote","description":"Raspar múltiples URL en un solo trabajo por lotes","href":"/es/features/batch-scrape"},{"title":"Modo JSON - Resultado estructurado","description":"Extrae datos estructurados de páginas mediante LLM","sidebarTitle":"Modo JSON","href":"/es/features/llm-extract"},{"title":"Seguimiento de cambios","description":"Detecta y supervisa cambios en el contenido web entre ejecuciones de scraping","sidebarTitle":"Seguimiento de cambios","href":"/es/features/change-tracking"},{"title":"Modo mejorado","description":"Usa proxies mejorados para realizar scraping fiable en sitios complejos","href":"/es/features/enhanced-mode"},{"title":"Proxies","description":"Conoce los tipos de proxy, las ubicaciones y cómo Firecrawl selecciona proxies para tus solicitudes.","href":"/es/features/proxies"}]},{"title":"Rastrear","description":"Rastrea recursivamente un sitio web y obtén contenido de cada página","icon":"spider","href":"/es/features/crawl"},{"title":"Mapa","description":"Introduce un sitio web y obtén todas las URLs del sitio — extremadamente rápido","icon":"map","version":"v2","sidebarTitle":"Mapa","href":"/es/features/map"},{"title":"Búsqueda","description":"Busca en la web y obtén el contenido completo de los resultados","icon":"magnifying-glass","href":"/es/features/search"}]},{"group":"Webhooks","pages":[{"title":"Descripción general","description":"Notificaciones en tiempo real para tus operaciones de Firecrawl","icon":"link","href":"/es/webhooks/overview"},{"title":"Tipos de eventos","description":"Referencia de eventos de webhook","icon":"bolt","href":"/es/webhooks/events"},{"title":"Seguridad","icon":"shield-check","href":"/es/webhooks/security"},{"title":"Pruebas","description":"Probar y depurar webhooks","icon":"bug","href":"/es/webhooks/testing"}]},{"group":"Dashboard","pages":[{"title":"Descripción general","description":"Descripción general del panel de control de Firecrawl y sus funciones clave","href":"/es/dashboard"}]}]},{"tab":"SDKs","hidden":true,"searchable":true,"pages":[{"title":"SDKs","href":"/es/sdks/overview"}]},{"tab":"Integraciones","href":"https://www.firecrawl.dev/app"},{"tab":"Referencia de la API","pages":[{"title":"Referencia de la API","href":"/es/v1/api-reference/introduction"}]}]}],"global":{"anchors":[{"anchor":"Playground","icon":"play","href":"https://firecrawl.dev/playground"},{"anchor":"Blog","icon":"newspaper","href":"https://firecrawl.dev/blog"},{"anchor":"Comunidad","icon":"comment-dots","href":"https://community.firecrawl.dev/"},{"anchor":"Registro de cambios","icon":"list","href":"https://firecrawl.dev/changelog"}]}},{"language":"fr","pages":[{"title":"fr","href":"/fr/webhooks/security"}]},{"language":"ja","pages":[{"title":"ja","href":"/ja/webhooks/security"}]},{"language":"pt-BR","pages":[{"title":"pt-BR","href":"/pt-BR/webhooks/security"}]},{"language":"zh","pages":[{"title":"zh","href":"/zh/webhooks/security"}]}]},"basePath":"","title":"Seguridad de los webhooks | Firecrawl","buildId":"dpl_42LwxxU1kGN114H4XzwGYXa9ZDah","deploymentId":"dpl_42LwxxU1kGN114H4XzwGYXa9ZDah","dynamics":[],"chunks":[]}